Skip to content

Commit 32bbe82

Browse files
committed
src: fix objectwrap test case
Refs: nodejs/node-addon-api#485 The test case was relyingon the ordering of "for in" which is not guarranteed as per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in Update the testcase to check in an way that does not depend on ordering. PR-URL: nodejs/node-addon-api#495 Refs: nodejs/node-addon-api#485 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: NickNaso <[email protected]>
1 parent 266f829 commit 32bbe82

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/objectwrap.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,11 @@ const test = (binding) => {
7373
keys.push(key);
7474
}
7575

76-
assert.deepEqual(keys, [
77-
'testGetSet',
78-
'testGetter',
79-
'testValue',
80-
'testMethod'
81-
]);
76+
assert(keys.length = 4);
77+
assert(obj.testGetSet);
78+
assert(obj.testGetter);
79+
assert(obj.testValue);
80+
assert(obj.testMethod);
8281
}
8382
};
8483

0 commit comments

Comments
 (0)