Skip to content

Commit 31995e4

Browse files
BridgeARtargos
authored andcommitted
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 <[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]>
1 parent 8ba0da5 commit 31995e4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: 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)