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.60 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.59 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.58 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.57 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.56 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.55 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.54 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.53 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.52 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.51 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.50 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.49 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.48 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.47 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.46 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.45 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.44 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.43 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.42 node_modules/object.groupby/test/shimmed.js
immosquare-cleaner-0.1.41 node_modules/object.groupby/test/shimmed.js