Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 664be90

Browse files
BridgeARtargos
authored andcommittedMar 27, 2019
test: fix intrinsics test
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>
1 parent 45fc920 commit 664be90

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎test/parallel/test-freeze-intrinsics.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
require('../common');
44
const assert = require('assert');
55

6-
try {
7-
Object.defineProperty = 'asdf';
8-
assert(false);
9-
} catch {
10-
}
6+
assert.throws(
7+
() => Object.defineProperty = 'asdf',
8+
TypeError
9+
);

0 commit comments

Comments
 (0)
Please sign in to comment.