Replace jest with node:test - #213
Merged
Merged
Conversation
Snapshots are unchanged: the new library produces byte-identical output, so the existing .snap files still match without regeneration.
Relative imports in src were extensionless, so tsc emitted them unchanged into lib. Node's ESM resolver requires full specifiers, meaning the published package only loaded for consumers running it through a bundler; a plain Node ESM import failed with ERR_MODULE_NOT_FOUND. Source imports now carry .ts extensions, and rewriteRelativeImportExtensions rewrites them to .js on emit. This also unblocks running the tests directly on the sources. ts-jest resolved the extensionless imports, so the breakage was invisible until the test runner started using Node's own resolver. Replace jest with node:test and take @liflig/cdk-snapshot from the registry. Snapshot bodies are unchanged; only the jest file header is dropped. Drops the unused @aws-cdk/assert and tsx along with the jest toolchain, since Node strips types natively.
Contributor
|
🎉 This PR is included in version 2.5.161 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Swaps the jest ecosystem for the built-in
node:testrunner, and takes@liflig/cdk-snapshotfrom the registry now that it is published.Snapshot bodies are unchanged — only the jest file header is dropped.
Fix
Relative imports in
srcwere extensionless, sotscemitted them unchanged intolib.Node's ESM resolver requires full specifiers, so the published package only loaded for consumers running it through a bundler.
rewriteRelativeImportExtensionsnow rewrites the extensions on emit.This surfaced because
ts-jestresolved the extensionless imports and Node's own resolver does not.Removed
jest,@types/jestandts-jest, along with their config.tsx, since Node strips types natively.@aws-cdk/assert, which was unused and deprecated.