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

Fix single-line-html-close-first-line-* failing with Test262Error is not defined #4333

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

Boshen
Copy link
Member

@Boshen Boshen commented Nov 25, 2024

closes #4020

Updated the tests per #4020 (comment)

@Boshen Boshen requested a review from a team as a code owner November 25, 2024 15:14
@Boshen
Copy link
Member Author

Boshen commented Nov 25, 2024

Discovered this test case while setting up runtime execution tests in Oxc.

Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I think these will still fail because the negative key in the front matter says to expect a Test262Error. (see https://github.com/tc39/test262/blob/HEAD/CONTRIBUTING.md#negative)

I'd suggest throwing a built-in error type, preferably not SyntaxError since that might be accidentally thrown otherwise in the parse phase. Probably Error is fine.

@Boshen Boshen force-pushed the single-line-html-close-first-line-raw branch from b18a755 to cf64422 Compare November 26, 2024 06:11
@Boshen Boshen requested a review from ptomato November 26, 2024 06:11
@Boshen
Copy link
Member Author

Boshen commented Nov 26, 2024

Learned how to verify with test262-harness:

test262-harness  master ❯ ./bin/run.js --host-type node --host-path `which node` ~/github/test262/test/annexB/language/comments/*.js
Ran 13 tests
13 passed
0 failed

@ljharb
Copy link
Member

ljharb commented Nov 26, 2024

(fwiw in tests I love using EvalError for a builtin error type that isn't likely to come from anything but the test)

@Boshen
Copy link
Member Author

Boshen commented Nov 29, 2024

I changed to EvalError. Verified with test262-harness.

@ptomato
Copy link
Contributor

ptomato commented Dec 4, 2024

Thanks! EvalError works too.

@ptomato ptomato force-pushed the single-line-html-close-first-line-raw branch from 414b1ab to f5600e0 Compare December 4, 2024 19:52
@ptomato ptomato merged commit 42d8327 into tc39:main Dec 4, 2024
11 checks passed
@Boshen Boshen deleted the single-line-html-close-first-line-raw branch December 5, 2024 04:16
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.

Tests for --> in the first line should not have raw flag.
3 participants