Sha256: d532b7ec97a969066872733df8e2b3afe61d662355cba691a1cf7300dcf2bb51

Contents?: true

Size: 911 Bytes

Versions: 16

Compression:

Stored size: 911 Bytes

Contents

'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();
});

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.59 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.58 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.57 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.56 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.55 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.54 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.53 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.52 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.51 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.50 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.49 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.48 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.47 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.46 node_modules/string.prototype.repeat/tests/shimmed.js
immosquare-cleaner-0.1.45 node_modules/string.prototype.repeat/tests/shimmed.js