You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My extension is completely written with it, and I thought I would just be able to import the lib before importing my code, but this is not working.
When I attempt to use the polyfill in Jest, it fails with “This script should only be loaded in a browser extension.” because it can’t find chrome in the current context.
I’ve tried various ways to fix this (Jest globals, Jest setupFiles), but no luck so far.
My apologies that my testing skills are poor and this may even be off-topic!
I think Sinon Chrome is what I need, I just need a little help getting out of the starting blocks.
Thank you :)
The text was updated successfully, but these errors were encountered:
Hi,
Background: I'm a "fair weather" tester, but looks like I am going to have to up my game to start testing browser extensions.
Question: is it possible to use mozilla/webextension-polyfill with this library?
My extension is completely written with it, and I thought I would just be able to import the lib before importing my code, but this is not working.
When I attempt to use the polyfill in Jest, it fails with “This script should only be loaded in a browser extension.” because it can’t find
chrome
in the current context.I’ve tried various ways to fix this (Jest
globals
, JestsetupFiles
), but no luck so far.My apologies that my testing skills are poor and this may even be off-topic!
I think Sinon Chrome is what I need, I just need a little help getting out of the starting blocks.
Thank you :)
The text was updated successfully, but these errors were encountered: