Installations
npm install karma-firefox-launcher
Developer
karma-runner
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
14.21.3
NPM Version
8.12.0
Statistics
104 Stars
282 Commits
53 Forks
9 Watching
29 Branches
50 Contributors
Updated on 13 Jun 2024
Languages
JavaScript (99.44%)
Shell (0.56%)
Total Downloads
Cumulative downloads
Total Downloads
112,518,469
Last day
-10.7%
67,770
Compared to previous day
Last week
-0.8%
404,047
Compared to previous week
Last month
14.7%
1,649,323
Compared to previous month
Last year
-1.1%
16,865,896
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
karma-firefox-launcher
Launcher for Mozilla Firefox.
karma-firefox-launcher
is deprecated and is not accepting new features or general bug fixes.
See deprecation notice for karma
.
Web Test Runner,
jasmine-browser-runner
,
and playwright-test
provide
browser-based unit testing solutions which can be used as a direct alternative.
Installation
The easiest way is to keep karma-firefox-launcher
as a devDependency in your package.json
.
You can simple do it by:
1npm install karma-firefox-launcher --save-dev
Configuration
1// karma.conf.js 2module.exports = function (config) { 3 config.set({ 4 plugins: [require("karma-firefox-launcher")], 5 browsers: [ 6 "Firefox", 7 "FirefoxDeveloper", 8 "FirefoxAurora", 9 "FirefoxNightly", 10 ], 11 }); 12};
You can pass list of browsers as a CLI argument too:
1karma start --browsers Firefox,Chrome
To run Firefox in headless mode, append Headless
to the version name, e.g. FirefoxHeadless
, FirefoxNightlyHeadless
.
Environment variables
You can specify the location of the Firefox executable using the following environment variables:
FIREFOX_BIN
(for browserFirefox
orFirefoxHeadless
)FIREFOX_DEVELOPER_BIN
(for browserFirefoxDeveloper
orFirefoxDeveloperHeadless
)FIREFOX_AURORA_BIN
(for browserFirefoxAurora
orFirefoxAuroraHeadless
)FIREFOX_NIGHTLY_BIN
(for browserFirefoxNightly
orFirefoxNightlyHeadless
)
Custom Firefox location
In addition to Environment variables you can specify location of the Firefox executable in a custom launcher:
1browsers: ['Firefox68', 'Firefox78'], 2 3customLaunchers: { 4 Firefox68: { 5 base: 'Firefox', 6 name: 'Firefox68', 7 command: '<path to FF68>/firefox.exe' 8 }, 9 Firefox78: { 10 base: 'Firefox', 11 name: 'Firefox78', 12 command: '<path to FF78>/firefox.exe' 13 } 14}
Custom Preferences
To configure preferences for the Firefox instance that is loaded, you can specify a custom launcher in your Karma
config with the preferences under the prefs
key:
1browsers: ['FirefoxAutoAllowGUM'], 2 3customLaunchers: { 4 FirefoxAutoAllowGUM: { 5 base: 'Firefox', 6 prefs: { 7 'media.navigator.permission.disabled': true 8 } 9 } 10}
Loading Firefox Extensions
If you have extensions that you want loaded into the browser on startup, you can specify the full path to each
extension in the extensions
key:
1browsers: ['FirefoxWithMyExtension'], 2 3customLaunchers: { 4 FirefoxWithMyExtension: { 5 base: 'Firefox', 6 extensions: [ 7 path.resolve(__dirname, 'helpers/extensions/myCustomExt@suchandsuch.xpi'), 8 path.resolve(__dirname, 'helpers/extensions/myOtherExt@soandso.xpi') 9 ] 10 } 11}
Please note: the extension name must exactly match the 'id' of the extension. You can discover the 'id' of your
extension by extracting the .xpi (i.e. unzip XXX.xpi
) and opening the install.RDF file with a text editor, then look
for the em:id
tag under the Description
tag. If your extension manifest looks something like this:
1<?xml version="1.0" encoding="utf-8"?> 2 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> 3 <Description about="urn:mozilla:install-manifest"> 4 <em:id>myCustomExt@suchandsuch</em:id> 5 <em:version>1.0</em:version> 6 <em:type>2</em:type> 7 <em:bootstrap>true</em:bootstrap> 8 <em:unpack>false</em:unpack> 9 10 [...] 11 </Description> 12</RDF>
Then you should name your extension myCustomExt@suchandsuch.xpi
.
For more information on Karma see the homepage.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 3/6 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/karma-runner/karma-firefox-launcher/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/karma-runner/karma-firefox-launcher/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/karma-runner/karma-firefox-launcher/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/karma-runner/karma-firefox-launcher/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/karma-runner/karma-firefox-launcher/release.yml/master?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 27 are checked with a SAST tool
Reason
18 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w
- Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj
- Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3.3
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to karma-firefox-launcher
@types/karma-firefox-launcher
TypeScript definitions for karma-firefox-launcher
@wikimedia/karma-firefox-launcher
A Karma plugin. Launcher for Firefox.
karma-chrome-launcher
A Karma plugin. Launcher for Chrome and Chrome Canary.
karma-browserstack-launcher
A Karma plugin. Launch any browser on BrowserStack!