In short.
Bun Jest Migration is an assistant skill for developers migrating Jest test suites to Bun, but conflicting timer instructions and unspecified runtime versions require careful verification. Its concrete examples cover common edits, including bun:test imports, mock.module calls and bunfig.toml configuration. The broad compatibility claims are not supported by execution results, and a referenced compatibility matrix is not supplied. Treat it as a migration checklist whose behavioral assumptions need checking against the chosen Bun release.
Researched and written by an AI model and checked by a second AI model. How it works
The selected scope is plugins/bun/skills/bun-jest-migration in secondsky/claude-skills at revision 88378361314f558fb719aec0af9fd898ab36f0b2. The supplied manifest contains SKILL.md within that folder and the repository-level LICENSE above it. Both supplied texts were considered in full. The named references/compatibility-matrix.md is not present in the supplied manifest, so its contents and availability are unknown. Other repository skills, Bun and Jest implementations, external documentation and project-specific behavior are outside the supplied evidence. Nothing was installed, executed or tested.
The overview
identity
The resource is bun-jest-migration, a skill in secondsky/claude-skills at plugins/bun/skills/bun-jest-migration. Its metadata declares version 1.0.0 and describes its purpose as helping with Jest-to-Bun migration, import compatibility, mocks and configuration.
It supplies instructions and example code for an assistant or developer to apply to an existing project. The supplied material does not demonstrate an automatic migration tool.
assessment
The skill offers a useful starting checklist because it places before-and-after examples beside common migration problems. Its strongest practical coverage concerns imports, function mocks, module mocks, snapshots and test scripts.
Confidence is limited by conflicting timer guidance and compatibility claims without a named Bun release. The examples have not been executed, so successful migration, compatibility and performance remain unassessed.
users
The intended users are developers and coding assistants working on JavaScript or TypeScript projects that already use Jest. Beginners receive recognizable examples and error remedies; experienced developers receive a compact list of APIs and configuration fields to inspect.
Projects relying on timer control, mock hoisting or browser-style test environments need particular care. The document discusses timer and hoisting differences, while its removal commands include jest-environment-jsdom without describing an environment replacement.
capabilities
The skill shows how to replace @jest/globals imports with bun:test, use mock and spyOn, convert module mocking to mock.module, retain snapshot assertions and define custom matchers with expect.extend.
It also illustrates package scripts for normal, watch and coverage runs, a bunfig.toml configuration, and remedies for missing imports and snapshot mismatches. These are documented instructions; their compatibility across projects is not established.
Using it
requirements
Following the examples requires Bun to be available, an existing Jest test suite, and access to edit test files, package.json and test configuration. Applying the examples also requires understanding the project's mocks, setup files and expected test behavior.
No minimum Bun or Jest version, operating-system requirements, assistant installation procedure or skill-loading configuration is specified.
mechanism
The skill works through a text-based migration sequence: change the test runner command, translate imports and APIs, move configuration, then investigate failures. Compatibility tables and examples guide the assistant or developer making those edits.
For module mocks, it contrasts Jest's hoisting behavior with Bun's inline mock.module approach and offers dynamic imports as one way to control when a mocked module is loaded. Actual import-order behavior is not demonstrated by a runnable project.
setup
The proposed sequence removes Jest-related dependencies, changes the test script to bun test, converts jest.config.js to bunfig.toml and updates imports and mock calls. The expanded sequence also removes jest-environment-jsdom.
The configuration example uses preload for the former setupFilesAfterEnv file, timeout = 10000, coverage = true and coverageThreshold = 0.8. It does not establish equivalent setup timing, test discovery or coverage behavior; the original testMatch pattern has no explicit matching filter in the replacement example.
example
For a simple function mock, the guide replaces const fn = jest.fn().mockReturnValue('value') with const fn = mock(() => 'value'), using mock from bun:test. It also illustrates importing jest from bun:test and keeping a jest.fn-style call.
For snapshots, it retains toMatchSnapshot and toMatchInlineSnapshot assertions and gives bun test --update-snapshots as the update command. These examples show intended edits, with no supplied execution results confirming their behavior.
Assessment & evidence
limitations
Timer guidance is internally inconsistent. The API table maps jest.useFakeTimers to setSystemTime, a later example says Jest-compatible fake timers and advanceTimersByTime are supported, and another passage describes timer support as limited. The document leaves unclear which behavior applies to which Bun release.
The skill refers to references/compatibility-matrix.md for fuller API details and unsupported features, but that file is not supplied. Broad claims about matching Jest APIs therefore lack the promised detail.
No DOM-environment replacement, representative migration project, benchmark or test output is provided. The snapshot-error table suggests updating snapshots, but an observed mismatch would still need inspection to determine its cause.
reasoning
The resource's practical value comes from making common edits visible in one place. Developers can quickly identify where imports, mocks, scripts and configuration may need attention.
Its brevity also hides decisions that affect test meaning. Changing the clock, advancing scheduled callbacks, controlling module loading and replacing test setup are distinct concerns. The conflicting examples and missing version baseline make project-specific verification necessary before relying on compatibility claims.
alternatives
Retaining the existing Jest runner is the baseline alternative represented by the guide's before examples. Within the proposed Bun migration, the illustrated jest import from bun:test offers another approach to some mock calls instead of immediately rewriting every call to mock.
The supplied material does not compare other migration resources or establish a speed, cost or maintenance advantage over keeping Jest.
evidence
The substantive source is the original SKILL.md pinned to repository revision 88378361314f558fb719aec0af9fd898ab36f0b2 [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/plugins/bun/skills/bun-jest-migration/SKILL.md].
The related rights source is the repository LICENSE at that same revision [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/LICENSE]. Neither source supplies runtime logs, migration outcomes or benchmark results.
Access & freshness
costs
The skill states no purchase price, subscription requirement or measured migration cost. Assistant-service charges, execution costs and engineering time are unknown.
The MIT notice grants broad permission to use and redistribute the supplied material, but it does not establish the cost of the tools or services used to apply it.
rights
SKILL.md declares MIT, and the supplied repository LICENSE carries a 2025 copyright notice for Claude Skills Maintainers. The license permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.
The material is supplied without warranty, and the license disclaims liability. Redistribution should retain the supplied license notice alongside the skill.
freshness
The source snapshot was captured on 2026-11-16 at 21:40:18.243 UTC and is pinned to revision 88378361314f558fb719aec0af9fd898ab36f0b2. The skill's declared version is 1.0.0.
The capture time does not establish when the guidance was written or last validated. No Bun or Jest release is tied to the compatibility statements, so their applicability to a chosen runtime version is unknown.
actions
Before adopting the instructions, choose the intended Bun version and verify its timer, mocking and configuration APIs. Keep the working Jest setup available while comparing representative tests, especially those involving timers, module imports, setup hooks and DOM dependencies.
Inspect snapshot differences before accepting updates. Compare test discovery, results and coverage before removing Jest dependencies, and inspect complete output rather than relying on the guide's command that displays only the first 50 lines.
