Fake Browser
MV2
MV3
Vitest
Jest
Overview
An in-memory implementation of webextension-polyfill
for testing. Supports all test frameworks (Vitest, Jest, etc).
ts
pnpm i -D @webext-core/fake-browser
This package only really works with projects using node, so only the NPM install steps are shown.
See Testing Frameworks to setup mocks for your testing framework of choice.
Examples
See Implemented APIs for example tests and details on how to use each API.