Sha256: 3eb22fd86f918f77591d5e4afe8f7a35672250680e8f901cd640917e3dfaaf73

Contents?: true

Size: 880 Bytes

Versions: 49

Compression:

Stored size: 880 Bytes

Contents

'use strict';

require('../auto');

var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();

var isEnumerable = Object.prototype.propertyIsEnumerable;

var runTests = require('./tests');

var name = 'groupBy';
var fullName = 'Object.' + name;

test('shimmed', function (t) {
	var fn = Object[name];

	t.equal(fn.length, 2, fullName + ' has a length of 2');

	t.test('Function name', { skip: !functionsHaveNames }, function (st) {
		st.equal(fn.name, name, fullName + ' has name "' + name + '"');
		st.end();
	});

	t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
		et.equal(false, isEnumerable.call(Object, name), fullName + ' is not enumerable');
		et.end();
	});

	runTests(callBind(fn, Object), t);

	t.end();
});

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.40 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.39 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.38 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.32 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.31 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.30 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.29 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.28 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.27 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.26 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.25 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.24 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.23 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.22 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.21 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.20 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.19 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.18 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.17 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.16 node_modules/object.groupby/test/shimmed.js