3.2.0 • Published 2 years ago

karma-chrome-launcher v3.2.0

Weekly downloads
1,884,977
License
MIT
Repository
github
Last release
2 years ago

karma-chrome-launcher

js-standard-style npm version npm downloads

Build Status Dependency Status devDependency Status

Launcher for Google Chrome, Google Chrome Canary and Google Chromium.

Installation

The easiest way is to keep karma-chrome-launcher as a devDependency in your package.json, by running

$ npm i -D karma-chrome-launcher

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['Chrome', 'Chrome_without_security'], // You may use 'ChromeCanary', 'Chromium' or any other supported browser

    // you can define custom flags
    customLaunchers: {
      Chrome_without_security: {
        base: 'Chrome',
        flags: ['--disable-web-security', '--disable-site-isolation-trials']
      }
    }
  })
}

The --user-data-dir is set to a temporary directory but can be overridden on a custom launcher as shown below. One reason to do this is to have a permanent Chrome user data directory inside the project directory to be able to install plugins there (e.g. JetBrains IDE Support plugin).

customLaunchers: {
  Chrome_with_debugging: {
    base: 'Chrome',
    chromeDataDir: path.resolve(__dirname, '.chrome')
  }
}

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

$ karma start --browsers Chrome,Chrome_without_security

Headless Chromium with Puppeteer

The Chrome DevTools team created Puppeteer - it will automatically install Chromium for all platforms and contains everything you need to run it from within your CI.

Available Browsers

Note: Headless mode requires a browser version >= 59

  • Chrome (CHROME_BIN)
  • ChromeHeadless (CHROME_BIN)
  • Chromium (CHROMIUM_BIN)
  • ChromiumHeadless (CHROMIUM_BIN)
  • ChromeCanary (CHROME_CANARY_BIN)
  • ChromeCanaryHeadless (CHROME_CANARY_BIN)
  • Dartium (DARTIUM_BIN)

Usage

$ npm i -D puppeteer karma-chrome-launcher
// karma.conf.js
process.env.CHROME_BIN = require('puppeteer').executablePath()

module.exports = function(config) {
  config.set({
    browsers: ['ChromeHeadless']
  })
}

For more information on Karma see the homepage.

@tyz-wallet/tyz-wallet-core-build@jframe/ioc@rock-kit/ui-karma-configng-horoak-gulpbitcore-build-polis@nodesoccoop/angular-ncr-srcsdialer-reportsclying-uikelvin-id-generator-aws-xrayotel-aws-xray-id-generatordebox-web-coresammenclouds-uies6-workflowangular-rx-ui@temporg/config-karma@temporg/ui-karma-config@dotedu/ivx-web-story-forgeeduihst-component-system@cvpcasada/nwbng2workspace-addon-webpack-karmaforkliftjsjust-bi-toolkityii-vue-uilevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29@alexeagle/rules_karmaeslint-config-helmcclibyarntest@everything-registry/sub-chunk-2005omp-comcesium-serialization-plugintasegirsystem-canopy-scriptsyn-dev-toolstepez-static-websitewidecore-buildwerbas-connectorwix-gruntfilewl-power-pluginwa.component.validatorwa.validator2web-ui-depsvulcan-jslintervusion-cliwebdatabasetest1webdatabasetest10webdevkit-gugweiler-electrode-archetype-react-app-devxin-ui20210822xethya-extension-basexes-webpack-coresaffron-bundlersaguisharedcomponentsshared-sofa-component-tasksshark-testshenxin-uishowcar-gulpsexcore-buildsg-karmascania-angular-uirebird-https-letsencryptrebel-con-dev-depsreinform-scripts-apprg-npm-devreactive-gulp-taskssuper-powered-api-testingsumcore-buildspoonx-toolssport-judgeseqcore-buildrsc-testseeroad-uirgui-toolstestenvtestweblibapitest_gulu_leetestlogintestlogin1testlogin2testlogin3testlogin4testlib17vss-authvue-click-to-editvue-color-tablevue-cli-plugin-ui-karmavue-cli-plugin-unit-karmavue-cli-plugin-unit-karmajsvue-cli-plugin-unit-karmajscli3
3.2.0

2 years ago

3.1.1

3 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.2.0

7 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.1

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago

0.0.1

12 years ago