Skip to content

Commit

Permalink
src: fix testEnumerables on ObjectWrap
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node-addon-api#736
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
wroy7860 committed Jun 9, 2020
1 parent 9840ae9 commit 7a43695
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/objectwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,15 @@ const test = (binding) => {
keys.push(key);
}

assert(keys.length = 4);
assert(obj.testGetSet);
assert(obj.testGetter);
assert(obj.testValue);
assert(obj.testMethod);
assert(keys.length == 6);
// on prototype
assert(keys.includes("testGetSet"));
assert(keys.includes("testGetter"));
assert(keys.includes("testValue"));
assert(keys.includes("testMethod"));
// on object only
assert(keys.includes("ownProperty"));
assert(keys.includes("ownPropertyT"));
}
};

Expand Down

0 comments on commit 7a43695

Please sign in to comment.