nodejs / import-in-the-middle

Like `require-in-the-middle`, but for ESM import
https://www.npmjs.com/package/import-in-the-middle
Apache License 2.0
60 stars 22 forks source link

allow importing of json files via import assert #25

Closed tlhunter closed 1 year ago

tlhunter commented 1 year ago

Fixes #24

This new syntax is only supported on certain versions of node.js. I've modified the test runner to allow specifying a minimum major version of Node.js by adding v99 to the filename, where 99 is the minimum major version. This means that a test named v14-foo.mjs will run in Node.js v14 and v16 but not in v12.