MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / testShouldThrowErrorIfKeyIsInvalid

Function testShouldThrowErrorIfKeyIsInvalid

test/object/delete_property.js:20–24  ·  view source on GitHub ↗
(nativeDeleteProperty)

Source from the content-addressed store, hash-verified

18 }
19
20 function testShouldThrowErrorIfKeyIsInvalid (nativeDeleteProperty) {
21 assert.throws(() => {
22 nativeDeleteProperty(undefined, 'test');
23 }, /Cannot convert undefined or null to object/);
24 }
25
26 const testObj = { 15: 42, three: 3 };
27

Callers 1

testFunction · 0.70

Calls

no outgoing calls

Tested by 1

testFunction · 0.56