Skip to content

Commit

Permalink
add missing Error.isError feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb authored and ptomato committed Oct 17, 2024
1 parent c54b89e commit 0645461
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions features.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/built-ins/Error/isError/bigints.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/built-ins/Error/isError/error-subclass.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
2 changes: 1 addition & 1 deletion test/built-ins/Error/isError/errors-other-realm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions test/built-ins/Error/isError/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions test/built-ins/Error/isError/fake-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion test/built-ins/Error/isError/is-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions test/built-ins/Error/isError/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions test/built-ins/Error/isError/non-error-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
esid: sec-error.iserror
description: >
Returns false on non-Error objects
features: [Error.isError]
---*/

assert.sameValue(Error.isError({}), false);
Expand Down
1 change: 1 addition & 0 deletions test/built-ins/Error/isError/primitives.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
esid: sec-error.iserror
description: >
Returns false on primitives
features: [Error.isError]
---*/

assert.sameValue(Error.isError(), false);
Expand Down
1 change: 1 addition & 0 deletions test/built-ins/Error/isError/prop-desc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
2 changes: 1 addition & 1 deletion test/built-ins/Error/isError/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 0645461

Please sign in to comment.