Add a command to run Test262 tests for spec conformance #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #3 by adding a new command
yarn run test262
that runs 6000+ Temporal-related tests in Test262 (the TC39 spec-conformance test suite) against this repo's Temporal polyfill.The current results are below. The good news: 3500+ tests pass! The bad news: 2700+ tests fail.☹️
Test262 files are checked in as a git submodule which will need to be updated periodically like all submodules.
I used the optimized test runner from the tc39/proposal-temporal repo, with only a few minor changes to adapt to this polyfill.
When running Test262 tests, terser is turned off for easier debugging and so that the test runner output doesn't emit indecipherable, long output when tests fail.
I also added a launch.json profile for debugging Test262 tests in VS Code. Something seems to be messed up with the sourcemap because when I break inside the debugger, the wrong line of code inside the polyfill is highlighted in the IDE. I wasn't sure if this was a pre-existing problem or not, so didn't try to fix it here.
I didn't check in yarn.lock with this PR because I had trouble getting the polyfill to build without upgrading yarn, and I was hesitant to check in those upgrades.
I also didn't include Test262 in the
yarn test
script that gates all PRs, because there's likely a lot of work required to get those 2700+ tests passing in the meantime.Let me know how you'd like me to proceed with this PR!