jest-chrome
jest-chrome copied to clipboard
A complete mock of the Chrome API for Chrome extensions for use with Jest.
We use Jest 28 in our project. When installing jest-chrome, we get the following error: ``` ~> npm i jest-chrome -save-dev --save-exact npm ERR! code ERESOLVE npm ERR! ERESOLVE unable...
### Is your feature request related to a problem? Please describe. When using Manifest V3, [`chrome.browserAction` (and `pageAction`) is replaced with `chrome.action`](https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#action-api-unification). It looks like this is not supported by...
I updated my chrome extension to manifest v3, also I see that declarativeWebRequest is deprecated, and the recomendation is tu use declarativeNetRequest namespace which is not supported on jest-chrome. Thanks
### Google search terms `jest-chrome tabs.remove` ### Describe the bug The types for `chrome.tabs` is missing the `remove` property. ### How do we reproduce? Write `chrome.tabs.remove` in a typescript jest...
TS linter is throwing an error when trying to mock chrome.tabs.query  I think this is happening because chrome is overloading the query function name in their type definition: ...
### Is your feature request related to a problem? Please describe. Provide a factory for `chrome.runtime.Port`. Consider trying to test code that calls `chrome.runtime.connect`: ```ts const mockConnect = (extensionId?: string,...
### Is your feature request related to a problem? Please describe. When using `webextension-polyfill` you have to declare `chrome.runtime.id` as a string in `jest.setup.js`, like for example `chrome.runtime.id = 'test...
### Google search terms Jest-chrome mozilla/webextension-polyfill jest.setup ### Describe the bug When using jest-chrome with webextension-polyfill, the browser namespace property returns undefined (For example: browser.runtime.**sendMessage**). What's strange is that browser...
### Google search terms The error message of this issue ### Describe the bug Have set up Jest Chrome in an existing Vue project, and when I run the build...
Community guidelines: - [x] I have read and understand the [contributing guidelines](https://github.com/extend-chrome/.github/blob/master/.github/CONTRIBUTING.md) and [code of conduct](https://github.com/extend-chrome/.github/blob/master/.github/CODE_OF_CONDUCT.md) This PR contains: - [ ] bugfix - [ ] feature - [ ]...