add missing Error.isError feature flag

See https://github.com/tc39/test262/pull/4266#issuecomment-2419000590
This commit is contained in:
Jordan Harband 2024-10-17 08:31:54 -07:00 committed by Philip Chimento
parent c54b89e92e
commit 0645461999
13 changed files with 16 additions and 6 deletions

View File

@ -80,6 +80,10 @@ uint8array-base64
# https://github.com/tc39/proposal-atomics-microwait # https://github.com/tc39/proposal-atomics-microwait
Atomics.pause Atomics.pause
# Error.isError
# https://github.com/tc39/proposal-is-error
Error.isError
## Standard language features ## Standard language features
# #
# Language features that have been included in a published version of the # Language features that have been included in a published version of the

View File

@ -5,7 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns false on bigints Returns false on bigints
features: [BigInt] features: [Error.isError, BigInt]
---*/ ---*/
assert.sameValue(Error.isError(0n), false); assert.sameValue(Error.isError(0n), false);

View File

@ -5,7 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns true on userland Error subclasses Returns true on userland Error subclasses
features: [class] features: [Error.isError, class]
---*/ ---*/
class MyError extends Error {} class MyError extends Error {}

View File

@ -5,7 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns true on Error and Error subclass instances from a different realm Returns true on Error and Error subclass instances from a different realm
features: [cross-realm] features: [Error.isError, cross-realm]
---*/ ---*/
var other = $262.createRealm().global; var other = $262.createRealm().global;

View File

@ -5,6 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns true on Error and Error subclass instances Returns true on Error and Error subclass instances
features: [Error.isError]
---*/ ---*/
assert.sameValue(Error.isError(new Error()), true); assert.sameValue(Error.isError(new Error()), true);

View File

@ -5,6 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns false on non-Error objects pretending to be an Error Returns false on non-Error objects pretending to be an Error
features: [Error.isError]
---*/ ---*/
var fakeError = { var fakeError = {

View File

@ -16,7 +16,7 @@ info: |
If argument has a [[Construct]] internal method, return true. If argument has a [[Construct]] internal method, return true.
Return false. Return false.
includes: [isConstructor.js] includes: [isConstructor.js]
features: [Reflect.construct] features: [Error.isError, Reflect.construct]
---*/ ---*/
assert.sameValue(isConstructor(Error.isError), false, 'isConstructor(Error.isError) must return false'); assert.sameValue(isConstructor(Error.isError), false, 'isConstructor(Error.isError) must return false');

View File

@ -5,6 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
The initial value of Error.isError.name is "isError". The initial value of Error.isError.name is "isError".
features: [Error.isError]
---*/ ---*/
assert.sameValue(Error.isError.name, 'isError'); assert.sameValue(Error.isError.name, 'isError');

View File

@ -5,7 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns false on non-Error objects from a different realm Returns false on non-Error objects from a different realm
features: [cross-realm] features: [Error.isError, cross-realm]
---*/ ---*/
var other = $262.createRealm().global; var other = $262.createRealm().global;

View File

@ -5,6 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns false on non-Error objects Returns false on non-Error objects
features: [Error.isError]
---*/ ---*/
assert.sameValue(Error.isError({}), false); assert.sameValue(Error.isError({}), false);

View File

@ -5,6 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns false on primitives Returns false on primitives
features: [Error.isError]
---*/ ---*/
assert.sameValue(Error.isError(), false); assert.sameValue(Error.isError(), false);

View File

@ -9,6 +9,7 @@ info: |
has the attributes { [[Writable]]: true, [[Enumerable]]: false, has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [Error.isError]
---*/ ---*/
verifyProperty(Error, "isError", { verifyProperty(Error, "isError", {

View File

@ -5,7 +5,7 @@
esid: sec-error.iserror esid: sec-error.iserror
description: > description: >
Returns false on symbols Returns false on symbols
features: [Symbol] features: [Error.isError, Symbol]
---*/ ---*/
assert.sameValue(Error.isError(new Symbol()), false); assert.sameValue(Error.isError(new Symbol()), false);