Closed bakkot closed 6 years ago
Note: this should definitely be up-to-date with the es2016 branch before merging.
Also, these are added to the default npm run test
, which means it takes a lot longer (on my machine, 30 seconds instead of 10). It could be a separate command run by CI, if we want to avoid that.
This adds test262 as a dev dependency, and asserts that every test in it parses or fails to parse as appropriate.
The bulk of this PR is test expectations. These are split into files for ease of maintenance.
Managing expectations is a lot easier since the project adopted feature flags. Part of the test expectations is a list of flags we expect to indicate syntax which isn't parseable; some of these are parseable despite such a flag, and need to be explicitly whitelisted.
The test runner enforces that expectations are not stale: every named test must exist, and every test which is whitelisted as in the above paragraph must refer to an xfailed feature.
No tests are skipped, nor is a mechanism provided to do so.
Fixes #362.