Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/internal-slot/test/index.js
r0c6b92a r79a0317 10 10 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 11 11 t['throws']( 12 // @ts-expect-error 12 13 function () { SLOT.assert(primitive, ''); }, 13 14 TypeError, … … 18 19 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 19 20 t['throws']( 21 // @ts-expect-error 20 22 function () { SLOT.assert({}, nonString); }, 21 23 TypeError, … … 25 27 26 28 t['throws']( 27 function () { SLOT.assert({}, ' whatever'); },29 function () { SLOT.assert({}, '[[whatever]]'); }, 28 30 TypeError, 29 31 'nonexistent slot throws' … … 41 43 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 42 44 t['throws']( 45 // @ts-expect-error 43 46 function () { SLOT.has(primitive, ''); }, 44 47 TypeError, … … 49 52 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 50 53 t['throws']( 54 // @ts-expect-error 51 55 function () { SLOT.has({}, nonString); }, 52 56 TypeError, … … 57 61 var o = {}; 58 62 59 t.equal(SLOT.has(o, ' nonexistent'), false, 'nonexistent slot yields false');63 t.equal(SLOT.has(o, '[[nonexistent]]'), false, 'nonexistent slot yields false'); 60 64 61 65 SLOT.set(o, 'foo'); … … 68 72 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 69 73 t['throws']( 74 // @ts-expect-error 70 75 function () { SLOT.get(primitive, ''); }, 71 76 TypeError, … … 76 81 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 77 82 t['throws']( 83 // @ts-expect-error 78 84 function () { SLOT.get({}, nonString); }, 79 85 TypeError, … … 95 101 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 96 102 t['throws']( 103 // @ts-expect-error 97 104 function () { SLOT.set(primitive, ''); }, 98 105 TypeError, … … 103 110 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 104 111 t['throws']( 112 // @ts-expect-error 105 113 function () { SLOT.set({}, nonString); }, 106 114 TypeError,
Note:
See TracChangeset
for help on using the changeset viewer.