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

Function testProperty

test/object/subscript_operator.js:8–11  ·  view source on GitHub ↗
(obj, key, value, nativeGetProperty, nativeSetProperty)

Source from the content-addressed store, hash-verified

6
7function test (binding) {
8 function testProperty (obj, key, value, nativeGetProperty, nativeSetProperty) {
9 nativeSetProperty(obj, key, value);
10 assert.strictEqual(nativeGetProperty(obj, key), value);
11 }
12
13 testProperty({}, 'key', 'value', binding.object.subscriptGetWithCStyleString, binding.object.subscriptSetWithCStyleString);
14 testProperty({ key: 'override me' }, 'key', 'value', binding.object.subscriptGetWithCppStyleString, binding.object.subscriptSetWithCppStyleString);

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68