Repository navigation
Port ignition-ui tests from Mocha to node:test - #8867
Conversation
Run the to-mermaid tests under node --test with the repo's test reporter, using the template package's test, test:only and test:coverage scripts. Swap chai for node:assert/strict, nyc for c8, and drop the now unused Mocha and chai dependencies and the .mocharc.json and .nycrc files. ignition-ui now runs under node --test, so test:file can run it.
|
hardhatTotal size of the bundle: List of dependencies (sorted by size) |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Ignition UI migration to Node’s built-in test tooling.
No open issues 🎉
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
Migrates Ignition UI’s single test suite from Mocha to node:test, aligning it with the repository’s shared reporter and file-level test tooling.
Changes:
- Switches tests to Node’s built-in test and assertion APIs.
- Updates test scripts, adds focused-test support, and replaces nyc coverage with c8.
- Removes obsolete configuration and dependencies, and enables Ignition UI in
test:file.
| File | Description |
|---|---|
scripts/test-file.ts |
Enables file-level test execution for Ignition UI. |
pnpm-lock.yaml |
Synchronizes dependencies with the new test tooling. |
packages/ignition-ui/tsconfig.json |
Replaces Mocha global types with Node types. |
packages/ignition-ui/test/to-mermaid.ts |
Uses node:test and node:assert/strict. |
packages/ignition-ui/package.json |
Updates test and coverage commands and dependencies. |
packages/ignition-ui/.nycrc |
Removes obsolete nyc configuration. |
packages/ignition-ui/.mocharc.json |
Removes obsolete Mocha configuration. |
Review effort: Balanced
Convert over Ignition UI's single test file from mocha to
node:test.Some deps and helper files go. The scripts in
package.jsonto run tests and coverage update.