<commit_before># testcafe-browser-provider-nightmare
[![Build Status](https://travis-ci.org/ryx/testcafe-browser-provider-nightmare.svg)](https://travis-ci.org/ryx/testcafe-browser-provider-nightmare)

This is the [nightmare](https://github.com/segmentio/nightmare) browser provider plugin for [TestCafe](http://devexpress.github.io/testcafe).
It provides an electron-based, headless Chrome browser environment for running your tests in. It is popular for being more
solid and reliable than phantomjs, while at the same time giving better performance.


## Install

```
npm install testcafe-browser-provider-nightmare
```

## Usage

When you run tests from the command line, use the provider name when specifying browsers:

```
testcafe nightmare 'path/to/test/file.js'
```

When you use API, pass the provider name to the `browsers()` method:

```js
testCafe
    .createRunner()<commit_msg>added note about XVFB issue<commit_after># testcafe-browser-provider-nightmare
[![Build Status](https://travis-ci.org/ryx/testcafe-browser-provider-nightmare.svg)](https://travis-ci.org/ryx/testcafe-browser-provider-nightmare)

This is the [nightmare](https://github.com/segmentio/nightmare) browser provider plugin for [TestCafe](http://devexpress.github.io/testcafe).
It provides an electron-based, headless Chrome browser environment for running your tests in. It is popular for being more
solid and reliable than phantomjs, while at the same time giving better performance.

*Please note that the current implementation of electron and the underlying Chromium requires XVFB to be installed on Linux host systems, otherwise nightmare will not work. This will hopefully change soon as [a headless mode already landed in Chromium](https://bugs.chromium.org/p/chromium/issues/detail?id=546953#c148).*


## Install

```
npm install testcafe-browser-provider-nightmare
```

## Usage

When you run tests from the command line, use the provider name when specifying browsers:

```
testcafe nightmare 'path/to/test/file.js'
```

When you use API, pass the provider name to the `browsers()` method:

```js
testCafe
    .createRunner()
{'fraction_non_alphanumeric': 0.10618216139688533, 'fraction_numerical': 0.004247286455875413, 'mean_word_length': 5.144927536231884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6128544', 'n_tokens_mistral': 646, 'n_tokens_neox': 605, 'n_words': 208}