{"library":"vitest-chrome","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"0.1.0","tags":["javascript","api","chrome","chromium","extension","vitest","mock","test","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install vitest-chrome","imports":["import { chrome } from 'vitest-chrome'","Object.assign(global, chrome)","import * as chrome from 'vitest-chrome'"]},{"cmd":"yarn add vitest-chrome","imports":[]},{"cmd":"pnpm add vitest-chrome","imports":[]}],"homepage":null,"github":"https://github.com/probil/vitest-chrome","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vitest-chrome","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/vitest-chrome/compatibility"}}