From 796dfa5f93b117a4d705c73cfa47f75cf166f8b3 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 17 Oct 2024 08:31:54 -0700 Subject: [PATCH] add missing Error.isError feature flag See https://github.com/tc39/test262/pull/4266#issuecomment-2419000590 --- features.txt | 4 ++++ test/built-ins/Error/isError/bigints.js | 2 +- test/built-ins/Error/isError/error-subclass.js | 2 +- test/built-ins/Error/isError/errors-other-realm.js | 2 +- test/built-ins/Error/isError/errors.js | 1 + test/built-ins/Error/isError/fake-errors.js | 1 + test/built-ins/Error/isError/is-a-constructor.js | 2 +- test/built-ins/Error/isError/name.js | 1 + test/built-ins/Error/isError/non-error-objects-other-realm.js | 2 +- test/built-ins/Error/isError/non-error-objects.js | 1 + test/built-ins/Error/isError/primitives.js | 1 + test/built-ins/Error/isError/prop-desc.js | 1 + test/built-ins/Error/isError/symbols.js | 2 +- 13 files changed, 16 insertions(+), 6 deletions(-) diff --git a/features.txt b/features.txt index 6e53c605d1..dc88a06b8d 100644 --- a/features.txt +++ b/features.txt @@ -80,6 +80,10 @@ uint8array-base64 # https://github.com/tc39/proposal-atomics-microwait Atomics.pause +# Error.isError +# https://github.com/tc39/proposal-is-error +Error.isError + ## Standard language features # # Language features that have been included in a published version of the diff --git a/test/built-ins/Error/isError/bigints.js b/test/built-ins/Error/isError/bigints.js index e986d7bce6..0658d366a9 100644 --- a/test/built-ins/Error/isError/bigints.js +++ b/test/built-ins/Error/isError/bigints.js @@ -5,7 +5,7 @@ esid: sec-error.iserror description: > Returns false on bigints -features: [BigInt] +features: [Error.isError, BigInt] ---*/ assert.sameValue(Error.isError(0n), false); diff --git a/test/built-ins/Error/isError/error-subclass.js b/test/built-ins/Error/isError/error-subclass.js index 7278729091..54f039ca4a 100644 --- a/test/built-ins/Error/isError/error-subclass.js +++ b/test/built-ins/Error/isError/error-subclass.js @@ -5,7 +5,7 @@ esid: sec-error.iserror description: > Returns true on userland Error subclasses -features: [class] +features: [Error.isError, class] ---*/ class MyError extends Error {} diff --git a/test/built-ins/Error/isError/errors-other-realm.js b/test/built-ins/Error/isError/errors-other-realm.js index a6ca4fc4a2..3e5d3e1f40 100644 --- a/test/built-ins/Error/isError/errors-other-realm.js +++ b/test/built-ins/Error/isError/errors-other-realm.js @@ -5,7 +5,7 @@ esid: sec-error.iserror description: > 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; diff --git a/test/built-ins/Error/isError/errors.js b/test/built-ins/Error/isError/errors.js index 55c7b8fe0b..d061610660 100644 --- a/test/built-ins/Error/isError/errors.js +++ b/test/built-ins/Error/isError/errors.js @@ -5,6 +5,7 @@ esid: sec-error.iserror description: > Returns true on Error and Error subclass instances +features: [Error.isError] ---*/ assert.sameValue(Error.isError(new Error()), true); diff --git a/test/built-ins/Error/isError/fake-errors.js b/test/built-ins/Error/isError/fake-errors.js index 8734893974..05a86b6db6 100644 --- a/test/built-ins/Error/isError/fake-errors.js +++ b/test/built-ins/Error/isError/fake-errors.js @@ -5,6 +5,7 @@ esid: sec-error.iserror description: > Returns false on non-Error objects pretending to be an Error +features: [Error.isError] ---*/ var fakeError = { diff --git a/test/built-ins/Error/isError/is-a-constructor.js b/test/built-ins/Error/isError/is-a-constructor.js index c9c6c41f0e..f6b51958d3 100644 --- a/test/built-ins/Error/isError/is-a-constructor.js +++ b/test/built-ins/Error/isError/is-a-constructor.js @@ -16,7 +16,7 @@ info: | If argument has a [[Construct]] internal method, return true. Return false. includes: [isConstructor.js] -features: [Reflect.construct] +features: [Error.isError, Reflect.construct] ---*/ assert.sameValue(isConstructor(Error.isError), false, 'isConstructor(Error.isError) must return false'); diff --git a/test/built-ins/Error/isError/name.js b/test/built-ins/Error/isError/name.js index ba00cd2c12..6498ce6bdc 100644 --- a/test/built-ins/Error/isError/name.js +++ b/test/built-ins/Error/isError/name.js @@ -5,6 +5,7 @@ esid: sec-error.iserror description: > The initial value of Error.isError.name is "isError". +features: [Error.isError] ---*/ assert.sameValue(Error.isError.name, 'isError'); diff --git a/test/built-ins/Error/isError/non-error-objects-other-realm.js b/test/built-ins/Error/isError/non-error-objects-other-realm.js index 0e0bb3bf29..df41d062c7 100644 --- a/test/built-ins/Error/isError/non-error-objects-other-realm.js +++ b/test/built-ins/Error/isError/non-error-objects-other-realm.js @@ -5,7 +5,7 @@ esid: sec-error.iserror description: > Returns false on non-Error objects from a different realm -features: [cross-realm] +features: [Error.isError, cross-realm] ---*/ var other = $262.createRealm().global; diff --git a/test/built-ins/Error/isError/non-error-objects.js b/test/built-ins/Error/isError/non-error-objects.js index 49f6f3b822..8a7633d3ae 100644 --- a/test/built-ins/Error/isError/non-error-objects.js +++ b/test/built-ins/Error/isError/non-error-objects.js @@ -5,6 +5,7 @@ esid: sec-error.iserror description: > Returns false on non-Error objects +features: [Error.isError] ---*/ assert.sameValue(Error.isError({}), false); diff --git a/test/built-ins/Error/isError/primitives.js b/test/built-ins/Error/isError/primitives.js index 65bac9f636..4d14facb74 100644 --- a/test/built-ins/Error/isError/primitives.js +++ b/test/built-ins/Error/isError/primitives.js @@ -5,6 +5,7 @@ esid: sec-error.iserror description: > Returns false on primitives +features: [Error.isError] ---*/ assert.sameValue(Error.isError(), false); diff --git a/test/built-ins/Error/isError/prop-desc.js b/test/built-ins/Error/isError/prop-desc.js index 3d582e7a77..53d5b011d8 100644 --- a/test/built-ins/Error/isError/prop-desc.js +++ b/test/built-ins/Error/isError/prop-desc.js @@ -9,6 +9,7 @@ info: | has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. includes: [propertyHelper.js] +features: [Error.isError] ---*/ verifyProperty(Error, "isError", { diff --git a/test/built-ins/Error/isError/symbols.js b/test/built-ins/Error/isError/symbols.js index 9fb6d11061..7722f209c5 100644 --- a/test/built-ins/Error/isError/symbols.js +++ b/test/built-ins/Error/isError/symbols.js @@ -5,7 +5,7 @@ esid: sec-error.iserror description: > Returns false on symbols -features: [Symbol] +features: [Error.isError, Symbol] ---*/ assert.sameValue(Error.isError(new Symbol()), false);