-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
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
Please consider supporting Firefox's WebExtensions #40
Comments
@Standard8 great point! |
One way that would allow this library to keep up with new APIs and API changes (which are probably a bit rare) is to parse schema files. Had you considered that? Here is an example of the bookmarks API:
All of Firefox's extension schemas:
Parsing schema files would also make the behavior of the mocks very exact. |
@Standard8 hi. Why you can not use global.browser = require('sinon-chrome');
before(function() {
browser.tabs.query.yields([]);
// or
browser.tabs.query.returns(Promise.resolve([]));
}); |
@acvetkov Whilst that is possible, the browser namespace has different APIs to the chrome namespace, so simply duplicating the chrome one isn't likely to be correct - and could lead to code that runs tests fine still being wrong as the API isn't there. |
@Standard8 Ok. I'll implement schema files for chrome and FF webextensions |
|
Firefox is currently implementing web extensions - these are pretty much the same as the
chrome.*
, although there are a few differences.Firefox has created the
browser.*
namespace which is virtually the same as thechrome.*
space. There are two differences:browser.*
will gain Firefox specific extensions.browser.*
uses promises rather the callbacks.More information:
The text was updated successfully, but these errors were encountered: