refactor(run): migrate all packages from Jest to node:test#695
Draft
refactor(run): migrate all packages from Jest to node:test#695
Conversation
- Replace @jest/globals imports with node:test + @deepkit/run/expect - Add test:node script to all package.json files - Remove jest config from all package.json files - Add spyOn, expect.any, expect.anything, expect.arrayContaining, expect.objectContaining, expect.stringContaining to @deepkit/run/expect - Add .tsx file support to @deepkit/run hooks - Refactor jest.mock/jest.spyOn usage in framework and http tests - Remove jest dependencies from root package.json - Add scripts/run-tests.js for running all package tests Co-authored-by: marcj <450980+marcj@users.noreply.github.com>
Co-authored-by: marcj <450980+marcj@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Rework all package tests to use node:test and remove jest
refactor(run): migrate all packages from Jest to node:test
Feb 11, 2026
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.
Summary of changes
Removes Jest entirely from the codebase. All 133+ test files across 28+ packages now use
node:test+@deepkit/run/expect. Angular/GUI packages excluded per requirements.Test imports migration
All
@jest/globalsimports replaced:@deepkit/run/expectadditionsspyOn(obj, method)— lightweightjest.spyOnreplacementexpect.any(),expect.anything(),expect.arrayContaining(),expect.objectContaining(),expect.stringContaining()— asymmetric matcherstoHaveBeenCalled(),toHaveBeenCalledWith()— mock call assertions.rejects/.resolves— async promise matchers@deepkit/runloader.tsxfile support in ESM hooks and CJS extension handlersJest API refactors
jest.fn()→fn(),jest.spyOn()→spyOn()jest.mock()inapplication-server.spec.tsremoved (tests restructured)beforeAll/afterAll→before/after(node:test naming)Removed
jest-resolver.js,jest-serial-runner.js,packages/type/tests/jest-setup.tsjestconfig from allpackage.jsonfilesjest,ts-jest,@jest/globalsfrom root devDependenciesAdded
test:nodescript in every package with testsscripts/run-tests.js— runstest:nodeacross all packagesVerified passing: bson (561), type (1983), core (339), injector (129), topsort (21), event (15), workflow (6), stopwatch (2), logger (12), skeleton (1).
Relinquishment of Rights
Please mark following checkbox to confirm that you relinquish all rights of your changes:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.