Testing JavaScript with Test262

Issue #1461 new
Mike Pennisi
created an issue

Test262 is the official test suite of the
JavaScript language. Although its primary use case is JavaScript run times,
its extensive coverage of the language makes it useful for testing other kinds
of interpreters. This is especially true for new language features since tests
are a formal requirement at an early stage in the language standardization
process
. That leads to very good
support for new language features.

In recent years, I've been working to integrate Test262 in the test suites of
various JavaScript parsers. I'm interested in doing the same for lexing
projects like Pygments. Basically, we would attempt to lex each test file and
assert that only a subset produced errors.

Right now, Test262 doesn't have the proper metadata to support this use case.
It describes "negative syntax" tests generally without distinguishing grammar
errors (e.g. var class) from lexing errors (e.g. "unclosed string). I'd be
interested in introducing that information, but I'd like to gauge interest
here, first.

Would the maintainers be interested in using Test262 like this?

Comments (0)

  1. Log in to comment