Skip to content

Add Vitest test setup and CircleCI CI pipeline - #94

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/add-vitest-and-circleci-config
Open

Add Vitest test setup and CircleCI CI pipeline#94
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/add-vitest-and-circleci-config

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Vitest installed as a dev dependency (natural fit since the project already uses Vite — shared config, fast HMR-style reloads in watch mode)
  • vitest.config.ts created with the @common path alias so tests can import shared types cleanly
  • npm test script added (vitest run for CI; vitest alone gives watch mode locally)
  • Initial unit tests in src/common/common.test.ts covering the pure URL-classifier utilities (isChromeURL, isFirefoxURL) — 9 tests, all green
  • .circleci/config.yml created with:
    • Node 22 Docker executor (matches the project's runtime)
    • ~/.npm cache keyed on package-lock.json checksum to speed up repeated runs
    • Three sequential steps: npm run lintnpm testnpm run build

Test plan

  • Confirm CircleCI pipeline triggers on push and all three steps pass
  • Run npm test locally to see the 9 passing tests
  • Add more tests alongside new utility functions as the codebase grows

https://app.circleci.com/agents/circleci/977715b4-c847-474d-bc08-01d21c55ef7e/chat/f7f0958f-1476-4196-8398-6e6e90c991bc

- Install vitest and add `npm test` script (vitest run)
- Add vitest.config.ts with @common path alias
- Add initial unit tests for isChromeURL and isFirefoxURL pure utilities (9 tests)
- Create .circleci/config.yml: install → lint → test → build with npm cache

AI-Generated: true
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.

0 participants