-
Notifications
You must be signed in to change notification settings - Fork 330
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
WPT: Run tests with unsafeEval so they can use IOContext #3353
Conversation
What does this PR does that we couldn't do in the past? Can you add those changes to this pull-request as well. It's not possible to justify these changes without an example/test that comes with it. |
Many of the wpt test files rely on the need to perform io at the top level scope, as you know we want to be able to run those wpt files automatically as is, without porting those to workerd syntax. This PR is the solution @npaun and I came up with to support the case. We cannot use regular |
0e9d656
to
e15ea7c
Compare
Yes, but this PR doesn't add any of those new tests. It would be helpful if we at least enabled 1 test that uses this new code. |
It's not a particularly awesome demo but there is a simple way to check this change is working. Whereas before
Now they fail with: Which shows we can now run that part of the test code. |
Next time please add a test before merging that asserts the intended behavior. |
WPT tests are now declared as text bindings and executed with unsafeEval. This way they can do IOContext things.
This PR also fixes promise_test to store each promise created and await them all before evaluating the test results.