Files
NapCatQQ/.pnpm-store/v3/files/f3/fcb8dd51acd259b3e7931f7d5137169282e06a1ab138ebf9683a862849d9a228efc5a21b074ffa0a761cd6cd8b63b79971c9f32521b8fdc8eb6263ae9138d8
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

31 lines
911 B
Plaintext

'use strict';
var repeat = require('../');
repeat.shim();
var test = require('tape');
var defineProperties = require('define-properties');
var bind = require('function-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.equal(String.prototype.repeat.length, 1, 'String#repeat has a length of 1');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(String.prototype.repeat.name, 'repeat', 'String#repeat has name "repeat"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (st) {
st.equal(false, isEnumerable.call(String.prototype, 'repeat'), 'String#repeat is not enumerable');
st.end();
});
runTests(bind.call(Function.call, String.prototype.repeat), t);
t.end();
});