Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error.isError: Add test for DOMException #4322

Closed

Conversation

lionel-rowe
Copy link

Given that DOMExceptions diverge in certain ways from other types of error (notably not having an [[ErrorData]] internal slot as of current Web IDL spec, pending whatwg/webidl#1421), it seems prudent to include a test for this case.

@lionel-rowe lionel-rowe requested a review from a team as a code owner November 12, 2024 03:26
@linusg
Copy link
Member

linusg commented Nov 12, 2024

I feel like this belongs in WPT, no? It's testing a part of the WebIDL spec.

@lionel-rowe
Copy link
Author

I feel like this belongs in WPT, no? It's testing a part of the WebIDL spec.

Possibly, I'm new to this process. I guess it depends whether you consider the subject-under-test to be the Error.isError method or its DOMException argument.

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 12, 2024

I agree that wpt makes more sense here

@ljharb
Copy link
Member

ljharb commented Nov 12, 2024

yeah, that's a fair point, i approved too quickly. this definitely belongs in WPT.

@nicolo-ribaudo
Copy link
Member

Possibly, I'm new to this process. I guess it depends whether you consider the subject-under-test to be the Error.isError method or its DOMException argument.

@lionel-rowe To clarify why they are asking to move it to WPT, the rule for these two test suites is that they should only be using features present on the target platforms that they are testing.

WPT is tests for the web platform, while test262 is tests for ECMA-262-compliant platforms. The feature set of the web platform is a superset of the feature set of ECMA-262-compliant platforms: for example, DOMException is only available on the web platform and not in all ECMA-262 platforms.

test262 tests can only use ECMA-262 features, and WPT tests can only use web platform features (which include all ECMA-262 features).

Since this test is testing the interaction of an ECMA-262 feature with a web-platform-but-not-ECMA-262 feature, it should go in WPT.

@lionel-rowe
Copy link
Author

Thanks for the explanation @nicolo-ribaudo ! I'll close this and probably open a corresponding PR against WPT sometime (can't promise when though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants