Draft
Conversation
Delegates 'test' to 'test:unit' which excludes '*-e2e.test.js' files. E2e tests continue to run via 'npm run test:e2e'. Closes #149
Contributor
|
Cursor Agent can help with this pull request. Just |
The test:unit script already provided the isolation users need. npm test running all tests (including e2e) was the original intent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix:
npm testnow excludes e2e tests (#149)This PR resolves #149 by ensuring the
npm testscript exclusively runs unit tests, excluding end-to-end (e2e) tests.Why:
The
npm testscript previously executed all test files, including e2e tests, which was not the intended behavior for a general unit test command.How:
The
testscript inpackage.jsonnow delegates tonpm run test:unit. Thetest:unitscript already correctly excludes**/*-e2e.test.jsfiles, making the configuration DRY and ensuringnpm testandnpm run test:unitremain synchronized.Verification:
New tests have been added to
lib/exports.test.jsto explicitly verify that:npm testexcludes e2e tests.npm run test:unitexcludes e2e tests.npm run test:e2ecorrectly targets only e2e tests.This ensures the test script isolation is enforced at the configuration level and prevents future regressions.