mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00: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:
@@ -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