Sha256: 2fcd53fbc59f2998519995f4425a9f1cc2b1a3657b30896a5d0dfcc00d02bd80

Contents?: true

Size: 590 Bytes

Versions: 41

Compression:

Stored size: 590 Bytes

Contents

'use strict';

var test = require('tape');
var gOPD = require('../');

test('gOPD', function (t) {
	t.test('supported', { skip: !gOPD }, function (st) {
		st.equal(typeof gOPD, 'function', 'is a function');

		var obj = { x: 1 };
		st.ok('x' in obj, 'property exists');

		var desc = gOPD(obj, 'x');
		st.deepEqual(
			desc,
			{
				configurable: true,
				enumerable: true,
				value: 1,
				writable: true
			},
			'descriptor is as expected'
		);

		st.end();
	});

	t.test('not supported', { skip: gOPD }, function (st) {
		st.notOk(gOPD, 'is falsy');

		st.end();
	});

	t.end();
});

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.50 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.49 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.48 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.47 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.46 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.45 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.44 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.43 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.42 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.41 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.40 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.39 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.38 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.32 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.31 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.30 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.29 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.28 node_modules/gopd/test/index.js
immosquare-cleaner-0.1.27 node_modules/gopd/test/index.js