gulp-mocha
Advanced tools
Comparing version 0.1.2 to 0.1.3
'use strict'; | ||
var es = require('event-stream'); | ||
var Mocha = require('mocha'); | ||
var path = require('path'); | ||
@@ -9,2 +10,3 @@ module.exports = function (options) { | ||
return es.through(function (file) { | ||
delete require.cache[require.resolve(path.resolve(file.path))]; | ||
mocha.addFile(file.path); | ||
@@ -15,4 +17,3 @@ this.emit('data', file); | ||
if (errCount > 0) { | ||
var errMsg = errCount + ' ' + (errCount === 1 ? 'test' : 'tests') + ' failed.'; | ||
return this.emit('error', new Error(errMsg)); | ||
return this.emit('error', new Error('gulp-mocha: ' + errCount + ' ' + (errCount === 1 ? 'test' : 'tests') + ' failed.')); | ||
} | ||
@@ -19,0 +20,0 @@ |
{ | ||
"name": "gulp-mocha", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Run Mocha tests", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -25,3 +25,3 @@ # [gulp](https://github.com/wearefractal/gulp)-mocha [![Build Status](https://secure.travis-ci.org/sindresorhus/gulp-mocha.png?branch=master)](http://travis-ci.org/sindresorhus/gulp-mocha) | ||
gulp.src('app.js') | ||
.pipe(mocha({ui: 'nyan'})); | ||
.pipe(mocha({reporter: 'nyan'})); | ||
}); | ||
@@ -28,0 +28,0 @@ ``` |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
2934
19
2