Closed
Description
in 'test/objectwrap.cc' the property 'testGetter' is defined as enumerable:
InstanceAccessor("testGetter", &Test::Getter, nullptr, napi_enumerable),
but testing if this property is enumerable:
gms@orion:~/work/RESEARCH/node-addon-api (master *)$ git diff
diff --git a/test/objectwrap.js b/test/objectwrap.js
index de16a60..e5d3efc 100644
--- a/test/objectwrap.js
+++ b/test/objectwrap.js
@@ -11,6 +11,10 @@ const test = (binding) => {
};
const testAccessor = (obj, clazz) => {
+ // enumerable
+ {
+ assert.strictEqual(obj.propertyIsEnumerable('testGetter'), true);
+ }
// read-only, write-only
{
obj.testSetter = 'instance getter';
fails with:
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
false !== true
Metadata
Metadata
Assignees
Labels
No labels