Skip to content

test: run the test suite on Node 26 - #290

Open
beeman wants to merge 1 commit into
mainfrom
beeman/test-on-node-26
Open

beeman wants to merge 1 commit into
mainfrom
beeman/test-on-node-26

Conversation

@beeman

@beeman beeman commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

mock-fs patches Node fs internals and throws at import time on Node 26 (tschaub/mock-fs#447), which took down search-and-replace.test.ts as a whole and failed the Test & Lint on Node current job on every PR — current resolves to 26.8.1 since Node 26 shipped. All actual tests pass; only the mock-fs import crashes.

mock-fs was used in exactly one test, to create an unreadable (mode 0o000) file so readFile fails. That call is now stubbed via a vitest passthrough mock of node:fs/promises instead, and mock-fs and @types/mock-fs are removed. Every other test in the file already runs against a real temp directory.

Also adds an explicit 26 entry to the test matrix so Node 26 stays covered after current rolls to 27 in October.

Verified locally on Node 26.8.1: full pnpm test (lint, types, vitest with coverage) passes, 165/165 tests.

Replaces #289, same diagnosis. No changeset: dev-dependency and test changes only, nothing ships to users.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 216c803

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/create-solana-dapp@290

commit: 216c803

@greptile-apps

greptile-apps Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the dependency removal is complete, and the replacement mock exercises the intended error path without affecting other tests.

Summary

This PR restores Node 26 test compatibility and keeps that runtime explicitly covered in CI.

  • Replaces the incompatible mock-fs usage with a scoped Vitest passthrough mock of node:fs/promises.
  • Removes the unused mock-fs packages and corresponding lockfile entries.
  • Adds Node 26 to the workflow test matrix alongside the rolling current release.

Reviews (2) · Last reviewed commit: "test: run the test suite on Node 26"

mock-fs patches Node fs internals and throws at import time on Node 26 (tschaub/mock-fs#447), which took down search-and-replace.test.ts and failed the 'Test & Lint on Node current' job on every PR. It was only used to make a single readFile call fail, so that call is stubbed via vitest instead and mock-fs is removed. Adds an explicit 26 entry to the test matrix so coverage remains when 'current' moves on. Replaces #289, same diagnosis.
@beeman
beeman force-pushed the beeman/test-on-node-26 branch from 7d585dd to 216c803 Compare September 19, 2026 19:12
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