Migrate All Test Suites From Jest to the Node Test Runner - #153
Merged
Merged
Conversation
…ct runs on the node runner
…n the node runner
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 21eeb42
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
| import type { FlowContext } from '../models/types' | ||
| import { describe, expect, it, jest } from '@hyperfrontend/testing' |
This branch was successfully deployed
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.
Description
Replaces jest with a workspace-owned test runtime built on
node:test. A newtools/testingpackage provides the runner (CLI, argv parsing, config loading, reporter), a jest-compatible mock API (jest.mock/doMock/requireMock/requireActual/resetModules, mock functions, spies, fake timers), module-replacement loader hooks, expect matchers, and per-environment DOM installation. Every library suite and every package-e2e format spec now runs on this runtime through a new@hyperfrontend/package:testexecutor, and the jest toolchain (configs, setup files, plugins, dependencies) is torn down across the repo, shrinking the workspace lockfiles substantially.Type of Change
✨ Feature | 🐛 Bug fix | ♻️ Refactor | 🔧 Build/Config | 📝 Docs
Changes Made
node:testworkspace test runtime (tools/testing): runner CLI and config, jest-compatible mocking (module replacement via loader hooks, mock functions, spies, fake timers), expect matchers, DOM environment support, and coverage merged by file with stable identitiestestexecutor to@hyperfrontend/packagefor the node runtime and make it the workspace default test target; new library and e2e scaffolding generates onto the node runnermaxCommitFallbackon the version executors and widen the versioning commit window to 170prefer-angle-bracket-assertionrule@hyperfrontend/features0.8.0 in the clock and heartbeat demos, revendor their shells, and track the published 1.0.0 utility libraries in docs-siteTesting
The entire change is exercised by the migrated suites themselves: every library and e2e project now runs green on the node test runner, with coverage gated against thresholds set from stable merged reports (lib-builder branches raised to 97). The test runtime in
tools/testingships with its own specs covering the runner, argv parsing, mock registry and declarations, resolver, spies, timers, and matchers.Checklist
npm run commitfor conventional commit messagesAI Assistance
Claude leveraged significantly for this refactor work.
Additional Notes
@hyperfrontend/package:testexecutor.tools/testing.📝 CLA Requirement
By submitting this pull request, you acknowledge that:
For more information, see our Contributing Guide.
Thank you for contributing to hyperfrontend! 🚀