We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
But the jest definition only has one definition for the mocked function:
The text was updated successfully, but these errors were encountered:
+1 when using chrome.tabs.get in a test
chrome.tabs.get
Sorry, something went wrong.
For anyone with this problem, you can trick typescript by casting the api method to jest.Mock like this:
jest.Mock
(chrome.tabs.get as jest.Mock).mockImplementation( ... )
No branches or pull requests
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:
But the jest definition only has one definition for the mocked function:
The text was updated successfully, but these errors were encountered: