Vitest Jest Bun Mocha
An in-memory implementation of the web extension APIs for testing. Supports all test frameworks (Vitest, Jest, etc) and any wrapper that respects the chrome or browser globals when present (webextension-polyfill, @wxt-dev/browser).
pnpm i -D @webext-core/fake-browser
See Testing Frameworks to setup mocks for your testing framework of choice.
See Implemented APIs for example tests and details on how to use each API.