Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprehensive ESM/CJS linkage tests #928

Closed
kriskowal opened this issue Nov 3, 2021 · 1 comment
Closed

Comprehensive ESM/CJS linkage tests #928

kriskowal opened this issue Nov 3, 2021 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@kriskowal
Copy link
Member

kriskowal commented Nov 3, 2021

The Compartment Mapper has a single, large integration test that shakes out some of the low hanging interoperability issues between CommonJS and ESM, especially at the packaging level, but is wholly inadequate for isolating unit test cases and covering all of the edge conditions. The benefit of the integration test as-is is that it covers all of the workflows through the compartment mapper including direct execution off disk and various workflows that pass through an archive. We should create a scaffold that runs all of these workflows for individual unit test cases.

The tests in LavaMoat https://github.com/LavaMoat/LavaMoat/tree/main/packages/core/test/scenarios cover a number of oddities for CommonJS linkage. They utilize a scaffold—having a similar scaffold would reduce the cost of adding tests.

Also, an exhaustive set of tests from esbuild would give us considerably more coverage evanw/esbuild#1591 (comment)

@kriskowal kriskowal self-assigned this Nov 3, 2021
@kriskowal kriskowal added the good first issue Good for newcomers label Nov 3, 2021
@kriskowal
Copy link
Member Author

@naugtur got this with e2e tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant