Skip to content

test: ensure local tests use freshly built artifacts - #151

Merged
luojiyin1987 merged 2 commits into
masterfrom
fix/test-fresh-dist
Nov 4, 2026
Merged

luojiyin1987 merged 2 commits into
masterfrom
fix/test-fresh-dist

Conversation

@luojiyin1987

@luojiyin1987 luojiyin1987 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The current test script runs Jest without a build. Test helpers load the parser from dist/. Local tests can use old build files after source changes.

Changes

  • Add test:built to run the full suite against the current build.
  • Make pnpm test build the package before it runs tests.
  • Make test:update build the package before it updates snapshots.
  • Make CI use test:built after its build step.
  • Make prepublishOnly use test:built after its build step.

Validation

  • Remove dist/, then run pnpm test successfully.
  • Run pnpm run build and pnpm run test:built successfully.
  • Run pnpm run prepublishOnly successfully.
  • Remove dist/, then run pnpm run test:update successfully.
  • Confirm all 27 Jest suites and 2024 tests pass.
  • Confirm type, package, MDX, and benchmark entry checks pass.
  • Confirm API reports have no changes.
  • Run git diff --check successfully.

No sensitive data was added or redacted.

@luojiyin1987
luojiyin1987 merged commit 4c1f539 into master Nov 4, 2026
14 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.

1 participant