Skip to content

Commit

Permalink
test: fix intrinsics test
Browse files Browse the repository at this point in the history
So far this test did not verify that the call did indeed fail since
the error case was not checked. This makes sure the error is indeed
thrown as expected.

PR-URL: #26660
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
BridgeAR authored and targos committed Mar 27, 2019
1 parent 8ba0da5 commit 31995e4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/parallel/test-freeze-intrinsics.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
require('../common');
const assert = require('assert');

try {
Object.defineProperty = 'asdf';
assert(false);
} catch {
}
assert.throws(
() => Object.defineProperty = 'asdf',
TypeError
);

0 comments on commit 31995e4

Please sign in to comment.