Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/has-proto/test/index.js

    r0c6b92a r79a0317  
    22
    33var test = require('tape');
     4var gPO = require('reflect.getprototypeof/polyfill')();
     5var gOPD = require('gopd');
     6
    47var hasProto = require('../');
     8
     9var getter = require('dunder-proto/get');
    510
    611test('hasProto', function (t) {
     
    1116        if (result) {
    1217                t.notOk('toString' in obj, 'null object lacks toString');
     18                if (gOPD && getter) {
     19                        t.equal(getter(obj), null);
     20                }
    1321        } else {
    1422                t.ok('toString' in obj, 'without proto, null object has toString');
    15                 t.equal(obj.__proto__, null); // eslint-disable-line no-proto
     23                t.equal(gPO(obj), Object.prototype);
    1624        }
    1725
    1826        t.end();
    1927});
     28
Note: See TracChangeset for help on using the changeset viewer.