addfox-testing
Addfox Testing
Use this skill to implement automated testing for Addfox extensions.
When to use
- Creating unit tests for extension logic and utilities
- Mocking
chrome.*orbrowser.*APIs - Adding Playwright E2E tests for popup/content/background flows
- Running extension tests in CI
Test strategy
| Layer | Tool | Purpose |
|---|---|---|
| Unit | Rstest | Business logic, storage, messaging handlers |
| Component | Rstest + jsdom/happy-dom | UI rendering and interaction |
| E2E | Playwright | Real extension loading and user flows |
Minimum setup
- Add Rstest config and setup file for API mocks.
- Build extension before E2E (
addfox build). - Launch browser context with extension from
.addfox/extension.
Best practices
- Keep unit tests fast and isolated.
- Use E2E for critical cross-context flows.
- Run test matrix on Chromium + Firefox when applicable.
More from addfox/skills
addfox-best-practices
Best practices for building browser extensions with the Addfox framework. Use when developing extensions with Addfox, configuring manifest/entry/permissions, or when discussing MV3, cross-browser support, framework/styling choices, messaging, and content UI injection.
21addfox-debugging
Debug Addfox build and runtime issues, including terminal failures, manifest errors, extension loading issues, and context messaging problems.
18extension-functions-best-practices
Best practices for implementing browser extension features across 13 categories. Reference this skill when developing video, audio, image, translation, download, userscript, AI (including Chrome built-in AI / Gemini Nano), ad-blocker, theme, email, game, password manager, or Web3 wallet features.
18convert-web-pages-to-browser-extensions
Convert any frontend webpage into a browser extension entry page with an HTML entry. Supports popup, options, sidepanel, devtools, newtab, bookmarks override, history override, and custom entries. Use when the user asks to migrate or adapt an existing web page into extension UI.
7migrate-to-addfox
Migrate existing browser extensions from WXT, Plasmo, Extension.js/CRXJS, or vanilla setups to Addfox with incremental validation.
5