Skip to content

Commit 31995e4

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: #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 8ba0da5 commit 31995e4

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)