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

Tests for --> in the first line should not have raw flag. #4020

Open
woess opened this issue Mar 20, 2024 · 2 comments
Open

Tests for --> in the first line should not have raw flag. #4020

woess opened this issue Mar 20, 2024 · 2 comments

Comments

@woess
Copy link
Contributor

woess commented Mar 20, 2024

The following tests added in #4002 have the raw flag but are expected to throw a Test262Error:

test/annexB/language/comments/single-line-html-close-first-line-1.js
test/annexB/language/comments/single-line-html-close-first-line-2.js
test/annexB/language/comments/single-line-html-close-first-line-3.js

If executed without harness/sta.js, these tests will fail with ReferenceError: Test262Error is not defined instead. Therefore, the raw flag should be removed from these tests.

@nicolo-ribaudo
Copy link
Member

I think we still need raw to make sure that nothing is pre-prended to the test contents, maybe we can throw a string instead of a Test262Error

@woess
Copy link
Contributor Author

woess commented Mar 20, 2024

If it's important to run those tests in raw mode, maybe using one of the built-in Error types (other than SyntaxError) would be the way to go then? (or including Test262Error/a custom Error class in the test).

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

No branches or pull requests

2 participants