peggyjs / peggy

Peggy: Parser generator for JavaScript
https://peggyjs.org/
MIT License
914 stars 65 forks source link

Run tests on es modules #399

Closed hildjj closed 7 months ago

hildjj commented 1 year ago

When using --format es on the command line, with a grammar that includes import statements, I would like to be able to use -t and -T.

Import paths should be relative to either the output file (if specified), or to the grammar file (if no output specified). Tests should run in a vm/context like they do for commonjs.

hildjj commented 1 year ago

I have this working, still need to write tests.

hildjj commented 1 year ago

Right now, the tests cause a node segfault.

Blocked on https://github.com/nodejs/node/issues/44211

hildjj commented 1 year ago

This bug has better information: https://github.com/nodejs/node/issues/43205