Skip to content

Commit

Permalink
chore: Update README to match new parser options
Browse files Browse the repository at this point in the history
  • Loading branch information
NickTomlin committed Aug 2, 2016
1 parent 42c6eb1 commit 914e887
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ Via the CLI:
```shell
npm i -g protractor-flake

# Default options
protractor-flake

# Full options
# protractor-flake <protractor-flake-options> -- <options to be passed to protractor>
protractor-flake --node-bin node --max-attempts=3 -- path/to/protractor.conf.js
protractor-flake --protractor-path=/path/to/protractor --parser standard --node-bin node --max-attempts=3 -- path/to/protractor.conf.js
```

Protractor flake expects `protractor` to be on $PATH by default, but you can use the `--protractor-path` argument to point to the protractor executable.
Expand All @@ -31,8 +32,18 @@ Or programmatically:
```javascript
var protractorFlake = require('protractor-flake');

// Default Options
protractorFlake({
parser: 'standard'
}, function (status, output) {
proces.exit(status)
})

// Full Options
protractorFlake({
protractorPath: '/path/to/protractor',
maxAttempts: 3,
parser: 'standard',
// expects node to be in path
// set this to wherever the node bin is located
nodeBin: 'node',
Expand All @@ -43,6 +54,12 @@ protractorFlake({

```

### Parsers

Protractor flake defaults to using the `standard` parser, which will typically pick up failures run from non-sharded/multi-capability test runs using Jasmine 1 + 2 and Mocha.

You can override this with the `parser` option, specifying one of the [built in parsers](src/parsers/index.js).

# Caveats

This has not yet been tested with Protractor + Mocha. It _should_ function similarly. Please update with an issue or PR if this is not the case.
Expand Down

0 comments on commit 914e887

Please sign in to comment.