gulp-mocha
Advanced tools
Comparing version 5.0.0 to 6.0.0
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 [![Build Status](https://travis-ci.org/sindresorhus/gulp-mocha.svg?branch=master)](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
84
154
7
+ Addedsupports-color@^5.4.0
+ Addedansi-colors@1.1.0(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedbrowser-stdout@1.3.1(transitive)
+ Addedcommander@2.15.1(transitive)
+ Addedcross-spawn@6.0.6(transitive)
+ Addeddiff@3.5.0(transitive)
+ Addedexeca@0.10.0(transitive)
+ Addedextend-shallow@3.0.2(transitive)
+ Addedgrowl@1.10.5(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedis-extendable@1.0.1(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedisobject@3.0.1(transitive)
+ Addedminimatch@3.0.4(transitive)
+ Addedmocha@5.2.0(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addedplugin-error@1.0.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsupports-color@5.4.05.5.0(transitive)
- Removedansi-cyan@0.1.1(transitive)
- Removedansi-red@0.1.1(transitive)
- Removedarr-diff@1.1.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@2.1.0(transitive)
- Removedarray-slice@0.2.3(transitive)
- Removedbrowser-stdout@1.3.0(transitive)
- Removedcommander@2.11.0(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removeddiff@3.3.1(transitive)
- Removedexeca@0.8.0(transitive)
- Removedextend-shallow@1.1.4(transitive)
- Removedgrowl@1.10.3(transitive)
- Removedhas-flag@2.0.0(transitive)
- Removedkind-of@1.1.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedmocha@4.1.0(transitive)
- Removedplugin-error@0.1.2(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedsupports-color@4.4.0(transitive)
- Removedyallist@2.1.2(transitive)
Updatedexeca@^0.10.0
Updatedmocha@^5.2.0
Updatedplugin-error@^1.0.1