gulp-mocha
Advanced tools
Comparing version 4.3.1 to 5.0.0
'use strict'; | ||
const dargs = require('dargs'); | ||
const execa = require('execa'); | ||
const gutil = require('gulp-util'); | ||
const PluginError = require('plugin-error'); | ||
const through = require('through2'); | ||
@@ -46,3 +46,3 @@ // TODO: Use execa localDir option when available | ||
if (file.isStream()) { | ||
done(new gutil.PluginError('gulp-mocha', 'Streaming not supported')); | ||
done(new PluginError('gulp-mocha', 'Streaming not supported')); | ||
return; | ||
@@ -68,3 +68,3 @@ } | ||
.catch(err => { | ||
this.emit('error', new gutil.PluginError('gulp-mocha', err)); | ||
this.emit('error', new PluginError('gulp-mocha', err)); | ||
done(); | ||
@@ -71,0 +71,0 @@ }); |
{ | ||
"name": "gulp-mocha", | ||
"version": "4.3.1", | ||
"description": "Run Mocha tests", | ||
"license": "MIT", | ||
"repository": "sindresorhus/gulp-mocha", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"utils.js" | ||
], | ||
"keywords": [ | ||
"gulpplugin", | ||
"mocha", | ||
"test", | ||
"testing", | ||
"unit", | ||
"framework", | ||
"runner", | ||
"tdd", | ||
"bdd", | ||
"qunit", | ||
"spec", | ||
"tap" | ||
], | ||
"dependencies": { | ||
"dargs": "^5.1.0", | ||
"execa": "^0.6.0", | ||
"gulp-util": "^3.0.0", | ||
"mocha": "^3.0.0", | ||
"npm-run-path": "^2.0.2", | ||
"through2": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"gulp": "^3.9.1", | ||
"p-event": "^1.0.0", | ||
"xo": "*" | ||
} | ||
"name": "gulp-mocha", | ||
"version": "5.0.0", | ||
"description": "Run Mocha tests", | ||
"license": "MIT", | ||
"repository": "sindresorhus/gulp-mocha", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"utils.js" | ||
], | ||
"keywords": [ | ||
"gulpplugin", | ||
"mocha", | ||
"test", | ||
"testing", | ||
"unit", | ||
"framework", | ||
"runner", | ||
"tdd", | ||
"bdd", | ||
"qunit", | ||
"spec", | ||
"tap" | ||
], | ||
"dependencies": { | ||
"dargs": "^5.1.0", | ||
"execa": "^0.8.0", | ||
"mocha": "^4.1.0", | ||
"npm-run-path": "^2.0.2", | ||
"plugin-error": "^0.1.2", | ||
"through2": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"gulp": "^3.9.1", | ||
"p-event": "^1.0.0", | ||
"vinyl": "^2.1.0", | ||
"xo": "*" | ||
} | ||
} |
@@ -43,3 +43,3 @@ # gulp-mocha [![Build Status](https://travis-ci.org/sindresorhus/gulp-mocha.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-mocha) | ||
Options are passed directly to the `mocha` binary, so you can use any its [command-line options](http://mochajs.org/#usage) in a camelCased form. Arrays are correctly converted to the comma separated list format Mocha expects. Listed below are some of the more commonly used options: | ||
Options are passed directly to the `mocha` binary, so you can use any its [command-line options](http://mochajs.org/#usage) in a camelCased form. Arrays and key/value objects are correctly converted to the comma separated list format Mocha expects. Listed below are some of the more commonly used options: | ||
@@ -65,2 +65,9 @@ | ||
##### reporterOptions | ||
Type: `Object`<br> | ||
Example: `{reportFilename: 'index.html'}` | ||
Reporter specific options. | ||
##### globals | ||
@@ -123,3 +130,4 @@ | ||
.pipe(mocha()) | ||
.once('error', () => { | ||
.once('error', err => { | ||
console.error(err); | ||
process.exit(1); | ||
@@ -133,5 +141,15 @@ }) | ||
Or you might just need to pass the `exit` option: | ||
```js | ||
gulp.task('test', () => | ||
gulp.src(['test/**/*.js'], {read: false}) | ||
.pipe(mocha({reporter: 'list', exit: true})) | ||
.on('error', console.error) | ||
); | ||
``` | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
7405
152
5
+ Addedplugin-error@^0.1.2
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@2.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedcommander@2.11.0(transitive)
+ Addeddebug@3.1.0(transitive)
+ Addeddiff@3.3.1(transitive)
+ Addedexeca@0.8.0(transitive)
+ Addedextend-shallow@1.1.4(transitive)
+ Addedglob@7.1.2(transitive)
+ Addedgrowl@1.10.3(transitive)
+ Addedhas-flag@2.0.0(transitive)
+ Addedkind-of@1.1.0(transitive)
+ Addedmocha@4.1.0(transitive)
+ Addedplugin-error@0.1.2(transitive)
+ Addedsupports-color@4.4.0(transitive)
- Removedgulp-util@^3.0.0
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removedcommander@2.9.0(transitive)
- Removeddateformat@2.2.0(transitive)
- Removeddebug@2.6.8(transitive)
- Removeddiff@3.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedexeca@0.6.3(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglob@7.1.1(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgraceful-readlink@1.0.1(transitive)
- Removedgrowl@1.9.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjson3@3.3.2(transitive)
- Removedlodash._baseassign@3.2.0(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basecreate@3.0.3(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.create@3.1.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmocha@3.5.3(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.03.1.2(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedvinyl@0.5.3(transitive)
Updatedexeca@^0.8.0
Updatedmocha@^4.1.0