3.2.0 • Published 1 year ago

karma-chrome-launcher v3.2.0

Weekly downloads
1,884,977
License
MIT
Repository
github
Last release
1 year 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@eui/deps-base@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-uifront-end-guidelevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29@alexeagle/rules_karmaeslint-config-helmcclibyarntestpxt-core@everything-registry/sub-chunk-2005omp-comghs-umami-tonkotsu-curator-compilerghs-umami-tonkotsu-curator-devtoolsgherkin-karma-examplegix-gix-polar-karmagix-polar-karmagoodeggs-karmakoutilslci-core-tile-roilaxar-infrastructurekarma-extjskarma-extjs-jasmine-testerjust-spaloading-infolll-ui-1khcore-buildkhutzpakarma-webpack-bundlekarmatickarma-webpack-extendkarma-jasmine-istanbul-webpack-angularjskcd-common-toolskarma-tfs-stackkarma-browser-reporterkarma-angularity-solutionkarma-config-brcjskarma-configuratork-test-toolkotlinapitestkotlinapitest1kotlinapitest2levimultiplatform10levimultiplatformtestlevimultitestleviapitest1levicommontestlevicommontest1levicotestlevikotlinliblevikotlintestlevilibtest10levilibtest11levilibtest12levilibtest13levilibtest14levilibtest15levilibtest16levilibtest17levilibtest18levilibtest21levilibtest22levilibtest23levilibtest3levilibtest4levilibtest5levilibtest6levilibtest7levilibtest8
3.2.0

1 year ago

3.1.1

2 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

8 years ago

1.0.1

8 years ago

0.2.3

8 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago