mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
8ba0da57a4
commit
31995e4cd2
1 file changed
+4
-5
@@ -3,8 +3,7 @@
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
try {
|
||||
Object.defineProperty = 'asdf';
|
||||
assert(false);
|
||||
} catch {
|
||||
}
|
||||
assert.throws(
|
||||
() => Object.defineProperty = 'asdf',
|
||||
TypeError
|
||||
);
|
||||
Reference in new issue
Block a user