-
-
Notifications
You must be signed in to change notification settings - Fork 331
feat!: migrate tests to node:test and require Node 24 #3049
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
Draft
bennypowers
wants to merge
20
commits into
node24/typescript-upgrade
Choose a base branch
from
node24/test-and-esm
base: node24/typescript-upgrade
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,538
−11,924
Draft
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d33b2e2
feat!: migrate tests to node:test and require Node 24
bennypowers 97c6989
fix: update remaining test scripts and fix type imports
bennypowers 5fac977
fix: fix remaining .js imports in test assertions and type exports
bennypowers 0a8b8d0
fix: update test config to import from dist instead of deleted index.mjs
bennypowers 4faf9db
fix: use globalPackages instead of globals from storybook preview
bennypowers 5b03f89
fix: point storybook-utils exports to src/ (JSDoc package)
bennypowers e25c983
fix: comprehensive type import fixes and test migration
bennypowers 8e5aa3e
fix: fix integration test imports, assertion strings, and type exports
bennypowers 7d59eff
fix(test-runner-core): add node:test imports and fix .js extensions
bennypowers 4c658ac
fix(polyfills-loader): update minified snapshot for newer terser
bennypowers 4363b99
fix(dev-server-rollup): fix assertion strings with .ts -> .js
bennypowers c377677
fix(rollup-plugin-html): fix extractAssets tests and remove duplicate…
bennypowers e5eeb6e
fix(rollup-plugin-polyfills-loader): update systemjs hash in snapshot
bennypowers 5657efe
fix: integration test type:module, fixture node_modules, asset hashing
bennypowers cfa4b89
fix: integration tests, rollup-plugin-html, and remaining issues
bennypowers 639864c
fix: add __dirname to config-groups integration test
bennypowers 1acb4c9
fix: module-mocking import from dist, increase playwright firefox tim…
bennypowers 1004bf8
fix: executeServerCommand test migration, mark module-mocking todo
bennypowers 8d83d5a
style: format moduleMockingPlugin test with prettier
bennypowers 7303c42
fix: increase playwright webkit timeout to 60s
bennypowers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| "@web/browser-logs": major | ||
| --- | ||
|
|
||
| BREAKING: Migrate to Node.js native test runner | ||
|
|
||
| - Replace Mocha with Node.js `node:test` module | ||
| - Replace Chai with Node.js `node:assert/strict` | ||
| - Use Node 24's native TypeScript type stripping (enabled by default) | ||
| - Update test imports for ES modules (__dirname, require) | ||
| - All 41 tests passing | ||
|
|
||
| **Migration:** No API changes. Development-only breaking change. | ||
|
|
||
| **For contributors:** | ||
| - Tests now use `node:test` instead of Mocha | ||
| - Use `npm run test:node` to run tests | ||
| - Node 24+ required for development | ||
| - TypeScript test files run directly without build step |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| "@web/browser-logs": major | ||
| "@web/config-loader": major | ||
| "@web/dev-server": major | ||
| "@web/dev-server-core": major | ||
| "@web/dev-server-esbuild": major | ||
| "@web/dev-server-hmr": major | ||
| "@web/dev-server-import-maps": major | ||
| "@web/dev-server-legacy": major | ||
| "@web/dev-server-polyfill": major | ||
| "@web/dev-server-rollup": major | ||
| "@web/dev-server-storybook": major | ||
| "@web/mocks": major | ||
| "@web/parse5-utils": major | ||
| "@web/polyfills-loader": major | ||
| "@web/rollup-plugin-copy": major | ||
| "@web/rollup-plugin-html": major | ||
| "@web/rollup-plugin-import-meta-assets": major | ||
| "@web/rollup-plugin-polyfills-loader": major | ||
| "@web/rollup-plugin-workbox": major | ||
| "@web/storybook-builder": major | ||
| "@web/storybook-framework-web-components": major | ||
| "@web/storybook-utils": major | ||
| "@web/test-runner": major | ||
| "@web/test-runner-browserstack": major | ||
| "@web/test-runner-chrome": major | ||
| "@web/test-runner-cli": major | ||
| "@web/test-runner-commands": major | ||
| "@web/test-runner-core": major | ||
| "@web/test-runner-coverage-v8": major | ||
| "@web/test-runner-junit-reporter": major | ||
| "@web/test-runner-mocha": major | ||
| "@web/test-runner-module-mocking": major | ||
| "@web/test-runner-playwright": major | ||
| "@web/test-runner-puppeteer": major | ||
| "@web/test-runner-saucelabs": major | ||
| "@web/test-runner-selenium": major | ||
| "@web/test-runner-visual-regression": major | ||
| "@web/test-runner-webdriver": major | ||
| --- | ||
|
|
||
| **BREAKING**: Require Node.js 24 LTS (Iron) | ||
|
|
||
| Update minimum Node.js version from 18.0.0 to 24.0.0 across all packages. Node.js 18 reached EOL in April 2025 | ||
|
|
||
| **Migration:** | ||
| Update your Node.js version to 24 or later: | ||
| ```bash | ||
| nvm install 24 | ||
| nvm use 24 | ||
| ``` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| v24.11.1 |
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
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
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
4 changes: 3 additions & 1 deletion
4
integration/test-runner/tests/config-groups/runConfigGroupsTest.ts
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
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
4 changes: 3 additions & 1 deletion
4
integration/test-runner/tests/location-change/runLocationChangeTest.ts
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
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
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
4 changes: 3 additions & 1 deletion
4
integration/test-runner/tests/test-failure/runTestFailureTest.ts
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like all packages are getting a major, but I dont think anything changed in
@web/mocks?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Pascal I'll take this into account
On the one hand, the motivation for this PR train is to reduce maintenance burden by removing dependencies and build steps
On the other hand there's clearly user interest in retaining node 22 until EOL in ~1yrs time.
I'd appreciate your perspective on this