Skip to content

Where the test support files and the e2e helper tests live, and how they get typechecked #290

Closed

Description

@jtklein-agents

Question

tsconfig.json includes only src, but the support files sit in jest/ and four tests in e2e/helpers/. Once they are TypeScript: does jest/ get renamed or moved, do the e2e/helpers tests stay beside the JavaScript helpers they test, and how do typecheck:baseline and yarn lint cover files outside src?

Activity

  1. added
    wayfinder:grilling
    on Nov 22, 2026
  2. jtklein-agents commented on Nov 22, 2026

    @jtklein-agents
    OwnerAuthor

    Resolution

    Support files move to src/test/; the e2e helper tests stay where they are.

    • Support files: jest/setup.js, mobxActionWarning.js, storeBridge.js, electron.js and sentry.js become src/test/<same name>.ts. jest/babelTransform.js and jest/fileMock.js are deleted with Jest, and the jest/ directory goes. Under src the files are typechecked, baseline-gated, linted and excluded from the packaged app by rules that already exist. A root test/ directory was rejected: it needs a tsconfig include, a wider baseline regex, a lint glob and a builder exclusion.
    • Follow-on edits the spec carries: the two imports in src/ (../jest/mobxActionWarning, ../../../jest/storeBridge), the CODING_STANDARDS.md line that names jest/storeBridge.js, the "jest/**/*.js" argument in the lint and lint:fix scripts, and the !jest{,/**/*} entry in the electron-builder files list.
    • e2e helper tests: the 4 tests stay in e2e/helpers/ as .test.ts, beside the JavaScript helpers they test. tsconfig.json gains "e2e/helpers/*.test.ts" in include. The second pass of scripts/typecheck-baseline.js (no implicit any in .ts) widens its path match from src/ to also cover e2e/. The four helpers have zero tsc diagnostics under checkJs today, so pulling them into the program adds nothing to the baseline.
    • Lint: the 4 e2e helper tests stay outside yarn lint, as e2e/ is today.
    • Config file: vitest.config.js at the root, linted like electron.vite.config.js and not typechecked. It replaces jest.config.js in the lint scripts. A .ts config was rejected because it would sit outside tsconfig.json's include.
    • Left to the spike: whether a test loads the CommonJS helpers with a plain import or needs createRequire.
  3. jtklein-agents commented on Nov 22, 2026

    @jtklein-agents
    OwnerAuthor

    Superseded in one point by Cutover order: swap the runner first or convert per file, one cutover or two runners: the config file is vitest.config.mjs, not vitest.config.js. The spike found the .js name prints a Vite warning on every run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions