Preparing for system design interviews?  Try bugzed.com →

Vitest Chrome API Mock

JSON →
library 0.1.0 ·javascript
verified Jun 17, 2026

vitest-chrome is a testing utility designed to provide a comprehensive mock of the Chrome Extension API, enabling developers to test their Chrome extension logic within a Vitest environment without requiring a real browser. As of version 0.1.0, it offers a complete set of mocked functions and events, all type-checked and based on the official `@types/chrome` definitions. This allows for robust and reliable testing of Chrome API interactions, including event listeners, synchronous API calls, and asynchronous functions relying on callbacks or `chrome.runtime.lastError`. The library is primarily used as a development dependency and integrates directly with Vitest's global setup to expose the mocked `chrome` object, simplifying the testing workflow for extension development.

total hits 10
actors 4 distinct systems
last hit 19d ago AhrefsBot
GPTBot
4
Script
1
Search engines
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany