Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update description about headless browsers #255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ 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](https://github.com/GoogleChrome/puppeteer) - it will automatically install Chromium for all
platforms and contains everything you need to run it from within your CI.

### Available Browsers
## Available Browsers
*Note: Headless mode requires a browser version >= 59*
*Note: Headless mode requires a browser version >= 59*

- Chrome (CHROME_BIN)
Expand All @@ -70,14 +66,16 @@ platforms and contains everything you need to run it from within your CI.
- ChromeCanaryHeadless (CHROME_CANARY_BIN)
- Dartium (DARTIUM_BIN)

#### Usage
```bash
$ npm i -D puppeteer karma-chrome-launcher
```
## Headless Chromium

To run karma with headless version of Chrome, Chromium and Chrome Canary you can use:

- ChromeHeadless
- ChromiumHeadless
- ChromeCanaryHeadless

```js
// karma.conf.js
process.env.CHROME_BIN = require('puppeteer').executablePath()

module.exports = function(config) {
config.set({
Expand Down