This pull request converts all files in the test directory from CommonJS modules to ECMAScript modules.
test/internal/List and test/internal/Sum are used by doctests in the main module, which remains a CommonJS module, so they must also remain CommonJS modules for now. I first renamed them:
This pull request converts all files in the test directory from CommonJS modules to ECMAScript modules.
test/internal/List and test/internal/Sum are used by doctests in the main module, which remains a CommonJS module, so they must also remain CommonJS modules for now. I first renamed them:
I then created wrapper modules for use within the test suite:
The only other non-trivial change involved using
module.createRequire
to keep theNODE_ENV
tests working.