Skip to content

Replace Jest with node:test and remove matcher dependency#1

Merged
eoftedal merged 3 commits into
mainfrom
copilot/replace-jest-with-node-test
Jun 30, 2026
Merged

Replace Jest with node:test and remove matcher dependency#1
eoftedal merged 3 commits into
mainfrom
copilot/replace-jest-with-node-test

Conversation

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This updates the test stack from Jest to Node’s built-in node:test runner and removes the temporary external matcher dependency. The test suite now runs on the standard Node toolchain with built-in assertions only.

  • Runner migration

    • Replace Jest-based test and testWatch scripts with node --import tsx --test
    • Remove the obsolete Jest configuration and Jest-specific dev dependencies
  • Assertion cleanup

    • Replace expect(...) matchers with node:assert/strict
    • Use deepStrictEqual, notStrictEqual, and partialDeepStrictEqual where the existing tests relied on equality, defined-ness, or partial object matching
  • Dependency reduction

    • Drop the added expect package so the test stack depends only on node:test + tsx
  • Docs alignment

    • Update contributor-facing instructions to describe the new test commands and single-file test invocation
import { describe, test } from 'node:test';
import assert from 'node:assert/strict';

test('finds JSX element names', () => {
  const nodes = query(code, '//JSXOpeningElement/:name/:name');
  assert.deepStrictEqual(nodes, ['div', 'span']);
});

Copilot AI changed the title Replace Jest with Node’s built-in test runner Replace Jest with node:test and remove matcher dependency Jun 30, 2026
@eoftedal eoftedal marked this pull request as ready for review June 30, 2026 07:33
@eoftedal eoftedal merged commit a57cbdb into main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants