Comparing version 0.8.2 to 0.9.0
@@ -17,3 +17,3 @@ // Generated by CoffeeScript 1.9.1 | ||
MochaArgumentBuilder.prototype.build = function(done) { | ||
return this._getTestFiles(this.config.testFileRegex, (function(_this) { | ||
return this._getTestFiles(this.config.testFilePattern, (function(_this) { | ||
return function(err, files) { | ||
@@ -28,3 +28,3 @@ if (err) { | ||
MochaArgumentBuilder.prototype._getTestFiles = function(testFileRegex, done) { | ||
MochaArgumentBuilder.prototype._getTestFiles = function(testFilePattern, done) { | ||
if (minimist(this.argv)._.length > 0) { | ||
@@ -35,3 +35,3 @@ return done(null, []); | ||
cwd: this.cwd, | ||
testFileRegex: testFileRegex | ||
testFilePattern: testFilePattern | ||
}).find(function(err, files) { | ||
@@ -38,0 +38,0 @@ if (err) { |
@@ -45,3 +45,3 @@ // Generated by CoffeeScript 1.9.1 | ||
MychaInstaller.prototype._writeMychaConfig = function(done) { | ||
return fsExtra.outputFile(path.join(this.cwd, 'mycha.coffee'), "module.exports =\n\n # Default options to pass to mocha (can be overriden by command line options)\n mochaOptions:\n colors: yes\n compilers: 'coffee:coffee-script/register'\n reporter: 'dot'\n\n # Regular expression used for finding tests\n testFileRegex: /_(spec|test)\\.(coffee|js)$/\n\n # Files to include before all tests\n testHelpers: [\n '" + this.testHelperPath + "'\n ]", (function(_this) { | ||
return fsExtra.outputFile(path.join(this.cwd, 'mycha.coffee'), "module.exports =\n\n # Default options to pass to mocha (can be overriden by command line options)\n mochaOptions:\n colors: yes\n compilers: 'coffee:coffee-script/register'\n reporter: 'dot'\n\n # Path patten used for finding tests (see https://github.com/isaacs/minimatch)\n testFilePattern: '**/*_{spec,test}.{coffee,js}'\n\n # Files to include before all tests\n testHelpers: [\n '" + this.testHelperPath + "'\n ]", (function(_this) { | ||
return function(err) { | ||
@@ -48,0 +48,0 @@ if (err) { |
@@ -11,12 +11,15 @@ // Generated by CoffeeScript 1.9.1 | ||
function TestFinder(arg) { | ||
this.cwd = arg.cwd, this.testFileRegex = arg.testFileRegex; | ||
this.cwd = arg.cwd, this.testFilePattern = arg.testFilePattern; | ||
} | ||
TestFinder.prototype.find = function(done) { | ||
if (!this.testFileRegex) { | ||
return done(Error('Please define a "testFileRegex" in your configuration file.')); | ||
var options; | ||
if (!this.testFilePattern) { | ||
return done(Error('Please define a "testFilePattern" in your configuration file.')); | ||
} | ||
return glob(this.cwd + "/**", { | ||
ignore: this.cwd + "/**/node_modules/**" | ||
}, (function(_this) { | ||
options = { | ||
cwd: this.cwd, | ||
ignore: '**/node_modules/**' | ||
}; | ||
return glob(this.testFilePattern, options, (function(_this) { | ||
return function(err, files) { | ||
@@ -26,4 +29,4 @@ if (err) { | ||
} | ||
return done(null, files.filter(function(file) { | ||
return file.match(_this.testFileRegex); | ||
return done(null, files.map(function(file) { | ||
return path.join(_this.cwd, file); | ||
})); | ||
@@ -30,0 +33,0 @@ }; |
{ | ||
"name": "mycha", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"main": "lib/mycha.js", | ||
@@ -12,3 +12,3 @@ "bin": { | ||
"colors": "^1.0.3", | ||
"cross-spawn": "^0.2.6", | ||
"cross-spawn": "^0.4.0", | ||
"dargs": "^4.0.0", | ||
@@ -43,4 +43,4 @@ "fs-extra": "^0.18.2", | ||
"sinon-chai": "^2.7.0", | ||
"tmp": "0.0.25" | ||
"tmp": "0.0.26" | ||
} | ||
} |
@@ -50,4 +50,4 @@ # Mycha [![Build Status](https://travis-ci.org/Originate/mycha.png?branch=master)](https://travis-ci.org/Originate/mycha) [![Dependency Status](https://david-dm.org/Originate/mycha.svg)](https://david-dm.org/Originate/mycha) | ||
# Regular expression used for finding tests | ||
testFileRegex: /_(spec|test)\.(coffee|js)$/ | ||
# Path patten used for finding tests (see https://github.com/isaacs/minimatch) | ||
testFilePattern: '**/*_{spec,test}.{coffee,js}' | ||
@@ -54,0 +54,0 @@ # Files to include before all tests |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12348
288
0
+ Addedbuffer-from@1.1.2(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcross-spawn@0.4.1(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedos-shim@0.1.3(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedspawn-sync@1.0.15(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedcross-spawn@0.2.9(transitive)
Updatedcross-spawn@^0.4.0