-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary
Migrate the JS SDK packages’ test suites off Vitest and onto Node’s built-in test runner (node:test), to match the CLI.
Context
- CLI tests already run via
node --test(see rootpackage.jsontestscript). - JS SDK packages under
clients/currently runvitest runand import fromvitestin tests.
Packages
clients/storybook(@vizzly-testing/storybook)clients/static-site(@vizzly-testing/static-site)clients/vitest(@vizzly-testing/vitest) is a Vitest integration; likely keep Vitest here unless there’s a clear benefit + no loss of coverage.
Work Items
- Replace Vitest runner scripts:
npm test->node --test ...npm test:watch->node --test --watch ...
- Rename or adjust discovery:
- either rename
tests/**/*.spec.js->tests/**/*.test.js, or pass explicit globs so Node finds tests.
- either rename
- Port test APIs:
import { describe, it } from 'node:test'- assertions via
node:assert/strict - replace
vi.fn()/spies withnode:testmockhelpers (or lightweight stubs) following the CLI patterns.
- Remove Vitest config + deps from affected packages:
- delete
vitest.config.js - remove
vitestfromdevDependencies
- delete
- Ensure CI stays green:
.github/workflows/ci.ymlclient jobs already runnpm test; they should pass without Vitest.
Acceptance Criteria
-
clients/storybook:npm testpasses on Node 22/24 withoutvitestinstalled. -
clients/static-site:npm testpasses on Node 22/24 withoutvitestinstalled. - No
vitestdependency/config remains in those packages. - CI client jobs remain green without changing their high-level steps.
Metadata
Metadata
Assignees
Labels
No labels