Skip to content

Commit

Permalink
src: fix objectwrap test case
Browse files Browse the repository at this point in the history
Refs: #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: #495
Refs: #485
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: NickNaso <[email protected]>
  • Loading branch information
mhdawson committed Jun 13, 2019
1 parent 3b6b9eb commit ab7d8fc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/objectwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ const test = (binding) => {
keys.push(key);
}

assert.deepEqual(keys, [
'testGetSet',
'testGetter',
'testValue',
'testMethod'
]);
assert(keys.length = 4);
assert(obj.testGetSet);
assert(obj.testGetter);
assert(obj.testValue);
assert(obj.testMethod);
}
};

Expand Down

0 comments on commit ab7d8fc

Please sign in to comment.