Skip to content

fix(react-wallet-kit): add missing jest-environment-jsdom devDep - #1474

Open
blockgroot wants to merge 1 commit into
tkhq:mainfrom
blockgroot:fix/1473-jest-environment-jsdom
Open

fix(react-wallet-kit): add missing jest-environment-jsdom devDep#1474
blockgroot wants to merge 1 commit into
tkhq:mainfrom
blockgroot:fix/1473-jest-environment-jsdom

Conversation

@blockgroot

Copy link
Copy Markdown

Summary & Motivation

Fixes #1473.

@turnkey/react-wallet-kit's test suite is broken: src/tests/timers-test.ts declares

/**
 * @jest-environment jsdom
 */

which requires jest-environment-jsdom to be resolvable, but that package was never a
devDependency of react-wallet-kit — only of the unrelated packages/telegram-cloud-storage-stamper.
Since the repo's .npmrc sets no hoist pattern, pnpm's default strict linking means one
workspace package can't resolve another's devDependency as a phantom dependency, so this
fails on both a full pnpm install -r and a scoped --filter install.

This has gone unnoticed because .github/workflows/reusable-test.yml runs
pnpm test --filter="$(./.github/scripts/get-turbo-affected.sh ...)" — only packages
turbo considers affected by the current diff. None of the recent merges to main touched
react-wallet-kit, so its test job was silently skipped every time.

Fix: add jest-environment-jsdom (matching the ^29.7.0 version already used by
telegram-cloud-storage-stamper) to react-wallet-kit's devDependencies. No source or
runtime change — this only makes the existing test declaration resolvable.

How I Tested These Changes

pnpm --filter @turnkey/react-wallet-kit test

Before:

FAIL src/tests/timers-test.ts
  ● Test suite failed to run
    Test environment jest-environment-jsdom cannot be found. ...

Test Suites: 1 failed, 3 passed, 4 total
Tests:       37 passed, 37 total

After:

PASS src/tests/captcha-test.ts
PASS src/tests/oauth-test.ts
PASS src/tests/timers-test.ts
PASS src/tests/utils-test.ts

Test Suites: 4 passed, 4 total
Tests:       49 passed, 49 total

Also ran pnpm --filter @turnkey/react-wallet-kit build and pnpm prettier --check on the
changed files — both clean.

pnpm-lock.yaml change is a hand-verified minimal 3-line addition (checked with
pnpm install --frozen-lockfile --filter "@turnkey/react-wallet-kit...", which reported
"Lockfile is up to date, resolution step is skipped" — no drift).

Did you add a changeset?

Yes — .changeset/tame-otters-jsdom.md, @turnkey/react-wallet-kit patch.

`src/tests/timers-test.ts` declares `@jest-environment jsdom`, but
`jest-environment-jsdom` was never a devDependency of this package
(only of the unrelated `telegram-cloud-storage-stamper` package), so
the suite failed to run under pnpm's strict linking regardless of a
full or scoped install.

This went unnoticed because CI only runs a package's tests when
turbo's affected-package filter includes it, and recent merges to
main hadn't touched react-wallet-kit.

Fixes tkhq#1473
@codesandbox-ci

codesandbox-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 332d8a2:

Sandbox Source
@turnkey/example-react-components Configuration

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.

react-wallet-kit: jest-environment-jsdom missing, timers-test.ts can't run (silently skipped by CI's affected-package filter)

1 participant