gulp-mocha
Advanced tools
Comparing version
14
index.js
@@ -5,2 +5,3 @@ 'use strict'; | ||
const PluginError = require('plugin-error'); | ||
const supportsColor = require('supports-color'); | ||
const through = require('through2'); | ||
@@ -20,3 +21,3 @@ // TODO: Use execa localDir option when available | ||
opts = Object.assign({ | ||
colors: true, | ||
colors: Boolean(supportsColor.stdout), | ||
suppress: false | ||
@@ -64,8 +65,9 @@ }, opts); | ||
proc.then(result => { | ||
this.emit('_result', result); | ||
done(); | ||
}) | ||
proc | ||
.then(result => { | ||
this.emit('_result', result); | ||
done(); | ||
}) | ||
.catch(err => { | ||
this.emit('error', new PluginError('gulp-mocha', err)); | ||
this.emit('error', new PluginError('gulp-mocha', err.code > 0 ? 'There were test failures' : err)); | ||
done(); | ||
@@ -72,0 +74,0 @@ }); |
{ | ||
"name": "gulp-mocha", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"description": "Run Mocha tests", | ||
@@ -13,3 +13,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=6" | ||
}, | ||
@@ -39,6 +39,7 @@ "scripts": { | ||
"dargs": "^5.1.0", | ||
"execa": "^0.8.0", | ||
"mocha": "^4.1.0", | ||
"execa": "^0.10.0", | ||
"mocha": "^5.2.0", | ||
"npm-run-path": "^2.0.2", | ||
"plugin-error": "^0.1.2", | ||
"plugin-error": "^1.0.1", | ||
"supports-color": "^5.4.0", | ||
"through2": "^2.0.3" | ||
@@ -45,0 +46,0 @@ }, |
@@ -43,2 +43,4 @@ # gulp-mocha [](https://travis-ci.org/sindresorhus/gulp-mocha) | ||
Type: `Object` | ||
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: | ||
@@ -45,0 +47,0 @@ |
'use strict'; | ||
// TODO: Use `Object.entries` when targeting Node.js 8 | ||
function objectEntries(object) { | ||
@@ -4,0 +5,0 @@ const entries = []; |
7632
3.07%84
3.7%154
1.32%7
16.67%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated