A freedom.js distribution for inclusion in Firefox extensions.
freedom-for-firefox.jsm can be placed anywhere in your extension file structure. In the case of jetpack addons, you will likely want to place it somewhere in the data dir. To include it in jetpack addon, use:
const Cu = ;// Note: data.url is relative to your data directoryCu
Or in classic firefox extensions use:
This will define the function
freedom in the current scope, which behaves the same way as
freedom in any other context.
grunt test will build an extension with jasmine integration tests and run the tests in Firefox.
You can extend this with your own tasks, by including this dependency in your own grunt project:
You would then configure the
build-test-addon task with your own jasmine tests, similarly to
how it is run by this project.
Some helpful flags you can add to the
grunt test command:
--verbose -d- get extremely verbose (debug-level) output
If you want the browser to stay open after the test run (e.g. to investigate
more in the debugger console) you can change
true. You can also directly run the addon
by installing jpm (
npm install jpm -g) and then entering the
- Mac OS X firewalls have been known to block WebRTC when set to its strictest setting. Be sure to allow an exception for Firefox for integration tests to pass