Skip to content

Consolidate Vitest configuration into vite.config.ts - #33

Merged
priscaenoch merged 1 commit into
octraban:mainfrom
jrcity:build/consolidate-vitest-config
Jul 28, 2026
Merged

Consolidate Vitest configuration into vite.config.ts#33
priscaenoch merged 1 commit into
octraban:mainfrom
jrcity:build/consolidate-vitest-config

Conversation

@jrcity

@jrcity jrcity commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR resolves a configuration collision where Vitest was silently ignoring the Vite testing settings. It standardizes the project to use a single vite.config.ts for both bundling and testing, removing duplicate sources of truth.

What changed

  • Consolidated all test configurations (including coverage targets) into vite.config.ts.
  • Consolidated resolve.alias definitions into vite.config.ts so Vite natively shares the same path aliases as Vitest.
  • Added @/* paths mapping to tsconfig.json for IDE and static type-checking support.
  • Configured ./test/setup.ts as the sole test setup file and ensured @testing-library/jest-dom/vitest is globally injected.
  • Added the /// <reference types="vitest" /> directive to vite.config.ts to strictly type the test configuration.
  • Deleted redundant files: vitest.config.ts and vitest.setup.ts.

Testing performed

  • npm test runs successfully, proving the setup file runs and injects jest-dom correctly (validated by vitest-setup.test.tsx).
  • npm run build executes without alias resolution errors.
  • npm run lint and tsc succeed, proving the new tsconfig.json paths resolve the @ alias properly.

Closes #16

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@jrcity is attempting to deploy a commit to the Prisca's projects Team on Vercel.

A member of the Team first needs to authorize it.

Moves test coverage, test environments, and alias path mappings into a unified vite.config.ts file to prevent duplicate sources of truth. Removes the redundant vitest.config.ts and vitest.setup.ts files.

Adds `@` path aliases to tsconfig.json to appease static analysis.
@jrcity
jrcity force-pushed the build/consolidate-vitest-config branch from 766d0c1 to c7fde54 Compare July 28, 2026 19:18
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
octraban Ready Ready Preview, Comment Jul 28, 2026 8:28pm

@priscaenoch
priscaenoch merged commit ca56a21 into octraban:main Jul 28, 2026
2 of 3 checks passed
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.

Remove the duplicate and conflicting Vitest configuration

2 participants