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

Function testSetProperty

test/object/set_property.js:8–12  ·  view source on GitHub ↗
(nativeSetProperty, key = 'test')

Source from the content-addressed store, hash-verified

6
7function test (binding) {
8 function testSetProperty (nativeSetProperty, key = 'test') {
9 const obj = {};
10 assert.strictEqual(nativeSetProperty(obj, key, 1), true);
11 assert.strictEqual(obj[key], 1);
12 }
13
14 function testShouldThrowErrorIfKeyIsInvalid (nativeSetProperty) {
15 assert.throws(() => {

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68