Skip to content

🐛 Bug - Test suite can't run: jest.config.ts needs ts-node, which isn't installed #2715

Open

Description

@PothieuG

Pain

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

  1. pnpm test runs the suite on a fresh clone + pnpm install, on both Windows and Linux.
  2. Tests run in CI on pull requests, and a failing test fails the check.
  3. No test is silently skipped because its config or environment is missing.

Reproduce Steps

  1. Clone the repo and run pnpm install.
  2. Run pnpm test.
  3. 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

  1. added
    Type: DevOpsSetting up of DevOps processes e.g. GitHub Actions, Azure DevOps Pipelines etc
    Type: BugA problem with existing functionality
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs RefinementType: BugA problem with existing functionalityType: DevOpsSetting up of DevOps processes e.g. GitHub Actions, Azure DevOps Pipelines etc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions