Skip to content

Convert the shell-config and e2e helper tests to TypeScript #299

Closed

Description

@jtklein-agents

Parent

#295

What to build

The six shell-config tests and the four e2e helper tests are TypeScript, and the typecheck covers the e2e helper tests, which sit outside src. The four e2e helper tests stay beside their CommonJS helpers and load them with a plain import. The helpers themselves, the Playwright specs and the Playwright configs are not converted.

Files (from master at 2044cbc; check the list against the tree before starting):

  • Directly under src/: mobxActionWarning, pack, pageNodeImports, preload, sourceMaps, typecheckBaseline (.test.js → .test.ts).
  • Under e2e/helpers/: modeltestOutcome, newick, raxmlHpcOutcome, raxmlNgOutcome (.test.js → .test.ts).

Typing rules: mocks are plain vi.fn(), with a type argument only where a test reads the mock's calls or results and tsc asks for it. A partial store stand-in is cast where it is used; no shared fixture builders. No production source changes: if a typed test exposes a wrong production type, report it for its own ticket.

Acceptance criteria

  • Commit one is a pure rename (git mv, R100 for every file). Commit two adds the types. yarn react-test passes after each.
  • The TypeScript config includes the e2e helper tests, and the second pass of the typecheck-baseline script is widened to cover them, so a diagnostic in one of those four files fails yarn typecheck:baseline.
  • A shell-config test that names another test file or a support file by path still finds it.
  • The converted files have zero diagnostics under --noImplicitAny, and nothing is added to the typecheck baseline.
  • No @ts-nocheck and no @ts-ignore. @ts-expect-error appears only with a one-line reason, where a test passes a wrong type on purpose to exercise a runtime guard.
  • The pull request states the test count per file before and after, and they are equal.
  • yarn lint, yarn typecheck:baseline and yarn react-test pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions