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: nodejs#26660
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
BridgeAR authored and targos committed Mar 27, 2019
1 parent 45fc920 commit 664be90
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 664be90

Please sign in to comment.