Skip to content

Extend automated test coverage #9

Description

@killerwolf

The project currently has zero automated tests — no test framework installed, no *.test.*/*.spec.* files anywhere in src/ or electron/.

Why Vitest

Fits naturally with the existing Vite build setup, fast, minimal config, good TypeScript + React support (via @testing-library/react).

Scope

  • npm install -D vitest @testing-library/react @testing-library/jest-dom jsdom
  • Add a test script and basic vitest.config.ts (reusing vite.config.ts aliases)
  • Wire npm test into release.yml's test job so it's a real CI gate
  • Initial coverage targets (highest value first):
    • electron/main.ts: getFileType() extension classification, scanFolder() filtering/sorting
    • Settings persistence round-trip (get/save via the IPC handlers)
    • FileViewer/CompletionScreen state transitions (delete/keep/undo)
  • Not aiming for full coverage in the first pass — establish the harness and cover the riskiest logic (file classification, undo stack) first

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions