Changeset 79a0317 for imaps-frontend/node_modules/has-proto/test/index.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/has-proto/test/index.js
r0c6b92a r79a0317 2 2 3 3 var test = require('tape'); 4 var gPO = require('reflect.getprototypeof/polyfill')(); 5 var gOPD = require('gopd'); 6 4 7 var hasProto = require('../'); 8 9 var getter = require('dunder-proto/get'); 5 10 6 11 test('hasProto', function (t) { … … 11 16 if (result) { 12 17 t.notOk('toString' in obj, 'null object lacks toString'); 18 if (gOPD && getter) { 19 t.equal(getter(obj), null); 20 } 13 21 } else { 14 22 t.ok('toString' in obj, 'without proto, null object has toString'); 15 t.equal( obj.__proto__, null); // eslint-disable-line no-proto23 t.equal(gPO(obj), Object.prototype); 16 24 } 17 25 18 26 t.end(); 19 27 }); 28
Note:
See TracChangeset
for help on using the changeset viewer.