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