# Addfox Testing

> Test Addfox extensions with Rstest for unit/component tests and Playwright for end-to-end extension loading.

- Skill: `addfox/addfox-testing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add addfox/addfox-testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/addfox/addfox-testing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: addfox (https://skillmd.com/u/addfox)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/addfox/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.*` or `browser.*` 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.

