Alexandro.Net

Version 1.0.0

@stackline/karma-firefox-launcher

A Karma plugin. Launcher for Firefox.

Independent maintenance of karma-firefox-launcher 2.1.3. Original authors and licenses are retained.

Installation

# Preserve existing imports with an npm alias
npm install karma-firefox-launcher@npm:@stackline/karma-firefox-launcher@1.0.0
# Or use the scoped package name in your imports
npm install @stackline/karma-firefox-launcher@1.0.0

Node.js: See compatibility notes. Read the compatibility and maintenance notes before migrating.

Usage and API

The reference below may retain upstream package names. Use the alias installation above to run those imports with this Stackline release.

@stackline/karma-firefox-launcher

Independent maintenance fork of karma-firefox-launcher@2.1.3. Original API, module format, runtime dependency ranges, and supported Node.js engines are preserved.

npm install @stackline/karma-firefox-launcher
# Preserve existing imports with an npm alias:
npm install karma-firefox-launcher@npm:@stackline/karma-firefox-launcher@1.0.0

See UPSTREAM.md for the exact source and issue review, and CHANGELOG.md for focused maintenance changes. Development and release tooling runs on Node.js 24; that does not change the library runtime requirement.

Maintained by Stackline. Issues · npm.

Upstream documentation

karma-firefox-launcher

js-standard-style npm version npm downloads semantic-release

Build Status Dependency Status devDependency Status

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:

npm install karma-firefox-launcher --save-dev

Configuration

// karma.conf.js
module.exports = function (config) {
  config.set({
    plugins: [require("karma-firefox-launcher")],
    browsers: [
      "Firefox",
      "FirefoxDeveloper",
      "FirefoxAurora",
      "FirefoxNightly",
    ],
  });
};

You can pass list of browsers as a CLI argument too:

karma 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:

Custom Firefox location

In addition to Environment variables you can specify location of the Firefox executable in a custom launcher:

browsers: ['Firefox68', 'Firefox78'],

customLaunchers: {
    Firefox68: {
        base: 'Firefox',
        name: 'Firefox68',
        command: '<path to FF68>/firefox.exe'
    },
    Firefox78: {
        base: 'Firefox',
        name: 'Firefox78',
        command: '<path to FF78>/firefox.exe'
    }
}

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:

browsers: ['FirefoxAutoAllowGUM'],

customLaunchers: {
    FirefoxAutoAllowGUM: {
        base: 'Firefox',
        prefs: {
            'media.navigator.permission.disabled': true
        }
    }
}

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:

browsers: ['FirefoxWithMyExtension'],

customLaunchers: {
    FirefoxWithMyExtension: {
        base: 'Firefox',
        extensions: [
          path.resolve(__dirname, 'helpers/extensions/myCustomExt@suchandsuch.xpi'),
          path.resolve(__dirname, 'helpers/extensions/myOtherExt@soandso.xpi')
        ]
    }
}

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:

<?xml version="1.0" encoding="utf-8"?>
   <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
  <Description about="urn:mozilla:install-manifest">
    <em:id>myCustomExt@suchandsuch</em:id>
    <em:version>1.0</em:version>
    <em:type>2</em:type>
    <em:bootstrap>true</em:bootstrap>
    <em:unpack>false</em:unpack>

    [...]
  </Description>
</RDF>

Then you should name your extension myCustomExt@suchandsuch.xpi.


For more information on Karma see the homepage.

Upstream issues and maintenance review

Upstream review

Based on karma-firefox-launcher@2.1.3, source 3a7e41ed2aa9f0e811e11aae6633151de6d7708f. The registry gitHead source manifest contains the previous semantic-release version, but every upstream published runtime file matches this commit byte-for-byte. Only package metadata differs in the upstream tarball, whose integrity was checked independently.

Issue triage (2026-09-29)

No upstream maintainer was contacted. Runtime files and original license/authorship are retained. Development tooling uses Node24; package engine declarations remain unchanged.

Verification

npm ci --ignore-scripts, npm test, npm run test:package, npm audit --audit-level=low. Packed tests install the actual archive and exercise the exported plugin. Publication uses the exact CI tarball only after CI and CodeQL succeed.

Release changes

Stackline changes

1.0.0

2.1.3 (2024-03-03)

2.1.2 (2021-11-02)

Bug Fixes

2.1.1 (2021-06-02)

Bug Fixes

2.1.0 (2020-11-03)

Features

2.0.0 (2020-10-20)

Bug Fixes

Features

BREAKING CHANGES

Node 8 EOL was 2019-12-31.

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.3.0 (2020-01-08)

Bug Fixes

1.2.0 (2019-08-09)

Bug Fixes

Features

1.1.0 (2017-12-07)

Bug Fixes

Features

1.0.1 (2017-03-04)

Bug Fixes

Release files and references

Package bytes, npm provenance and the immutable GitHub release were verified for this version. Security checks describe the reviewed release; documented compatibility risks and upstream reports are not blanket claims of resolution.