Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mycha

Package Overview
Dependencies
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mycha - npm Package Compare versions

Comparing version 0.8.2 to 0.9.0

6

lib/mocha_argument_builder.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc