Skip to content

Add Vitest test framework and CircleCI CI pipeline - #93

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown

Summary

  • Vitest installed as the test framework (integrates natively with the existing Vite build)
  • 11 unit tests written for the pure utility functions — isChromeURL, isFirefoxURL (src/common/common.ts), getHostname, and getFaviconURL (src/content/ui/components/ListItems/utils.ts)
  • .circleci/config.yml created with: dependency caching, lint, TypeScript type-check, and test steps
  • Fixed a pre-existing lint error: removed the unused injectExtension import from background.ts (its call was already commented out)

New files

File Purpose
.circleci/config.yml CI pipeline
vitest.config.ts Test runner config with jsdom + @common alias
src/common/common.test.ts Tests for URL utility functions
src/content/ui/components/ListItems/utils.test.ts Tests for getHostname / getFaviconURL

Test plan

  • npm run lint — clean (0 errors)
  • tsc --noEmit — passes
  • npm test — 2 test files, 11 tests, all passing

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

- Install vitest and jsdom as dev dependencies
- Add vitest.config.ts with jsdom environment and @common path alias
- Add "test": "vitest run" script to package.json
- Write 11 unit tests for isChromeURL, isFirefoxURL, getHostname, and getFaviconURL
- Create .circleci/config.yml with npm caching, lint, type-check, and test steps
- Fix pre-existing lint error: remove unused `injectExtension` import in background.ts

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