ratel-core icon indicating copy to clipboard operation
ratel-core copied to clipboard

Integrate with full test suites

Open ishitatsuyuki opened this issue 6 years ago • 1 comments

The current parser is probably not fully conformant to the ECMA spec. We need more thorough test cases; there are probably two ways to pick:

  1. esprima test cases. These are the test cases of a well-known parser, and is focused only on parsing. Case study: used by esprit.
  2. test262 test cases. These are the official conformance tests, designed to be not only parsed but also executed (which is a bit off for a parser). Case study: used by swc.

ishitatsuyuki avatar Jan 05 '19 05:01 ishitatsuyuki

It is worth noting that esprima also uses the official test262 tests using the test262-stream package apart from project-specific unit tests.

For this project, it would be beneficial to generate tests which attempt to parse the code from the test262 test suite.

For ratel-cli, a snapshot of the work at node-compat-table has been added in order to check for non-supported language features, see f.e. this build's output.

cmtt avatar Jan 05 '19 18:01 cmtt