grunt-wendy
Advanced tools
Comparing version 2.1.1 to 2.2.0
{ | ||
"name": "grunt-wendy", | ||
"description": "CasperJS test runner", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"homepage": "https://github.com/davidosomething/grunt-wendy", | ||
@@ -6,0 +6,0 @@ "author": { |
131
README.md
@@ -15,7 +15,7 @@ # <img src="https://raw.githubusercontent.com/davidosomething/grunt-wendy/master/docs/wendy.png" alt="grunt-wendy Logo" valign="middle" style="width: 1.5em;"> grunt-wendy | ||
* [custom casper test runners] | ||
* no grunt output (`silent` flag of grunt-casperjs is always on) | ||
* customizable output parsing | ||
* aggregated results across all casper tasks run | ||
* custom grunt exit status (warns on skips/dubious instead of failing) | ||
- [custom casper test runners] | ||
- no grunt output (`silent` flag of grunt-casperjs is always on) | ||
- customizable output parsing | ||
- aggregated results across all casper tasks run | ||
- custom grunt exit status (warns on skips/dubious instead of failing) | ||
@@ -34,4 +34,4 @@ ## Screenshot | ||
* npm package version 1.9.11 on OSX for phantomjs 1.9.7 (least buggy version) | ||
* npm package version >=1.9.15 on node.js 4.0 or io.js (the only installable | ||
- npm package version 1.9.11 on OSX for phantomjs 1.9.7 (least buggy version) | ||
- npm package version >=1.9.15 on node.js 4.0 or io.js (the only installable | ||
versions due to other dependencies) | ||
@@ -71,2 +71,3 @@ | ||
async: 'eachSeries', | ||
spawnOpts: null, | ||
cli: [], | ||
@@ -135,4 +136,4 @@ runner: 'test', | ||
* `each` - run in parallel | ||
* `eachSeries` - run in series | ||
- `each` - run in parallel | ||
- `eachSeries` - run in series | ||
@@ -149,2 +150,30 @@ ```javascript | ||
#### Node child_process options | ||
The task spawns casperJs binary instances as child processes of node. The raw | ||
`child_process.exec` options can be modified with the `spawnOpts` task option: | ||
```javascript | ||
wendy: { | ||
options: { | ||
spawnOpts: { | ||
cwd: '../', | ||
env: { | ||
SERVER: 'QA', | ||
API_KEY: 'abc123' | ||
}, | ||
} | ||
}, | ||
inparallel: ['tests/e2e/a/*.js'], | ||
inparallel2: ['tests/e2e/b/*.js'] | ||
} | ||
``` | ||
Of note is that you can change where you're running CasperJS from, e.g. | ||
in case your node_modules folder is for some reason not at the root of your | ||
project and you want to run CasperJS from a different directory to so you can | ||
require those modules. | ||
Most likely you won't need this or will just want the `env` key values. | ||
#### CLI Options | ||
@@ -209,4 +238,4 @@ | ||
* `whitespace`: boolean -- true to clean up casper whitespace | ||
* `filter`: regex -- anything that matches this filter will not be output | ||
- `whitespace`: boolean -- true to clean up casper whitespace | ||
- `filter`: regex -- anything that matches this filter will not be output | ||
@@ -256,41 +285,43 @@ ```javascript | ||
* 2.1.1 | ||
* License update | ||
* 2.1.0 | ||
* Add custom cli flag support, passing `--wendy` cli flags to casper | ||
* 2.0.0 | ||
* fix travis build by installing phantom, major bump | ||
* 1.0.5 | ||
* phantomjs is now a peer dependency | ||
* 1.0.4 | ||
* Ensure utf-8 output on process.stdout.write | ||
* 1.0.3 | ||
* Don't need lodash, removed | ||
* 1.0.2 | ||
* Logo :p | ||
* 1.0.1 | ||
* Readme update | ||
* 1.0.0 | ||
* Change `clean` to `formatterOptions.whitespace` | ||
* Add `filter` to formatterOptions | ||
* 0.0.6 | ||
* Add `fail` and `warn` options | ||
* 0.0.5 | ||
* Add `formatter` option | ||
* 0.0.4 | ||
* Use `grunt.util.linefeed` for better Windows output | ||
* 0.0.3 | ||
* Add test for dubious output | ||
* Fix aggregated output (skipped and dubious showing same result) | ||
* 0.0.2 | ||
* Split into modules in `lib/` | ||
* 0.0.1 | ||
* Forked from [ronaldlokers/grunt-casperjs] | ||
* Refactor into single grunt task module | ||
* Rename task from `casperjs` to `wendy` | ||
* Changed `casperjsOptions` option key to `cli` | ||
* Add support for custom runner | ||
* Always use `silent` option from unpublished release of casperjs | ||
* Expose node async settings | ||
* parse casper output and show aggregated results for a set of files | ||
- 2.2.0 | ||
- Expose node child_process spawn opts as a task option. | ||
- 2.1.1 | ||
- License update | ||
- 2.1.0 | ||
- Add custom cli flag support, passing `--wendy` cli flags to casper | ||
- 2.0.0 | ||
- fix travis build by installing phantom, major bump | ||
- 1.0.5 | ||
- phantomjs is now a peer dependency | ||
- 1.0.4 | ||
- Ensure utf-8 output on process.stdout.write | ||
- 1.0.3 | ||
- Don't need lodash, removed | ||
- 1.0.2 | ||
- Logo :p | ||
- 1.0.1 | ||
- Readme update | ||
- 1.0.0 | ||
- Change `clean` to `formatterOptions.whitespace` | ||
- Add `filter` to formatterOptions | ||
- 0.0.6 | ||
- Add `fail` and `warn` options | ||
- 0.0.5 | ||
- Add `formatter` option | ||
- 0.0.4 | ||
- Use `grunt.util.linefeed` for better Windows output | ||
- 0.0.3 | ||
- Add test for dubious output | ||
- Fix aggregated output (skipped and dubious showing same result) | ||
- 0.0.2 | ||
- Split into modules in `lib/` | ||
- 0.0.1 | ||
- Forked from [ronaldlokers/grunt-casperjs] | ||
- Refactor into single grunt task module | ||
- Rename task from `casperjs` to `wendy` | ||
- Changed `casperjsOptions` option key to `cli` | ||
- Add support for custom runner | ||
- Always use `silent` option from unpublished release of casperjs | ||
- Expose node async settings | ||
- parse casper output and show aggregated results for a set of files | ||
if `clean` option is true (default) | ||
@@ -297,0 +328,0 @@ |
@@ -46,5 +46,13 @@ var getCasperBinary = require('./getCasperBinary.js'); | ||
cmd: casperBin, | ||
// casperjs ARGS | ||
args: casperArgs.concat(filepath) | ||
}; | ||
// nodeSpawnOptions | ||
// See https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback | ||
if (options.spawnOpts) { | ||
spawnOpts.opts = options.spawnOpts; | ||
} | ||
/** | ||
@@ -51,0 +59,0 @@ * onFilepathDone |
@@ -23,2 +23,3 @@ 'use strict'; | ||
async: 'eachSeries', | ||
spawnOpts: null, | ||
cli: [], | ||
@@ -25,0 +26,0 @@ runner: 'test', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134879
399
345