Skip to content

Convert Cypress files to TypeScript#479

Merged
tudddorrr merged 1 commit intodevelopfrom
cy-ts
Feb 27, 2026
Merged

Convert Cypress files to TypeScript#479
tudddorrr merged 1 commit intodevelopfrom
cy-ts

Conversation

@tudddorrr
Copy link
Collaborator

No description provided.

@claude
Copy link

claude bot commented Feb 27, 2026

This is a clean TypeScript migration for the Cypress test suite. A couple of minor points worth addressing:


🔵 Minor

cypress/tsconfig.json does not cover cypress.config.ts

The "include": ["**/*.ts"] in cypress/tsconfig.json resolves to cypress/**/*.ts (relative to where the tsconfig lives). The root-level cypress.config.ts sits outside that directory and will not be type-checked by this config — nor by tsconfig.json (which only includes src/) or tsconfig.node.json (which only includes vite.config.ts).

Fix: add an explicit reference in cypress/tsconfig.json:

"include": ["**/*.ts", "../cypress.config.ts"]

"types": ["vitest/globals"] in tsconfig.node.json is unnecessary

The old /// <reference types="vitest" /> directive was needed to augment defineConfig from vite with Vitest's test options. Switching to import { defineConfig } from 'vitest/config' makes the directive redundant and already provides those config types directly through the import.

vitest/globals is a separate concern — it injects globals like describe, it, and expect into the environment, which are not needed in vite.config.ts. The addition is harmless but unnecessary noise in the node config.


Overall this is a solid, straightforward conversion with the declare global augmentation for custom commands and the centralised cypress/tsconfig.json being the right approach.

@tudddorrr tudddorrr merged commit b9ebc61 into develop Feb 27, 2026
5 checks passed
@tudddorrr tudddorrr deleted the cy-ts branch February 27, 2026 21:33
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.

1 participant