You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐛 Bug - Test suite can't run: jest.config.ts needs ts-node, which isn't installed #2715
pnpm test fails before it loads a single test, so nobody can run the test suite locally:
Error: Jest: Failed to parse the TypeScript config file C:\Dev\SSW\SSW.Rules\jest.config.ts
Error: Jest: 'ts-node' is required for the TypeScript configuration files. Make sure it is installed
Error: Cannot find package 'ts-node'
Figure: pnpm test on a clean checkout
Jest needs ts-node to parse a TypeScript config file. It isn't in package.json and isn't installed — jest, jest-environment-jsdom, @types/jest and @testing-library/jest-dom are there, but nothing that can read jest.config.ts.
The suite itself is fine: 9 suites, 54 tests, and they all pass once Jest can be started. They just can't be reached through the documented command.
No workflow runs the tests either. Nothing under .github/workflows/ calls pnpm test or jest, so the suite runs nowhere — not locally, not in CI. A test could break today and nobody would find out.
Acceptance Criteria
pnpm test runs the suite on a fresh clone + pnpm install, on both Windows and Linux.
Tests run in CI on pull requests, and a failing test fails the check.
No test is silently skipped because its config or environment is missing.
Reproduce Steps
Clone the repo and run pnpm install.
Run pnpm test.
Observe it fails on the config file before any test is collected.
Suggested fix
jest.config.ts is already written as ESM (import nextJest from "next/jest.js" / export default). Renaming it to jest.config.mjs makes Jest load it natively and needs no new dependency — package.json has no "type": "module", so .mjs is the right extension.
Adding ts-node as a devDependency would also work, but it buys a dependency to parse a 12-line config.
Either way the second half matters more: wire the tests into CI, otherwise the suite stays decorative.
Activity