Socket
Socket
Sign inDemoInstall

mocha

Package Overview
Dependencies
Maintainers
1
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha - npm Package Compare versions

Comparing version 0.0.1-alpha2 to 0.0.1-alpha3

bin/mocha-debug

15

History.md
0.0.1-alpha3 / 2011-11-15
==================
* Added `-s, --slow <ms>` to specify "slow" test threshold
* Added `mocha-debug(1)`
* Added `mocha.opts` support. Closes #31
* Added: default [files] to _test/*.js_
* Added protection against multiple calls to `done()`. Closes #35
* Changed: bright yellow for slow Dot reporter tests
0.0.1-alpha1 / 2011-11-08
==================
* Missed this one :)
0.0.1-alpha1 / 2011-11-08
==================
* Initial release

2

lib/mocha.js

@@ -12,3 +12,3 @@

exports.version = '0.0.1-alpha2';
exports.version = '0.0.1-alpha3';

@@ -15,0 +15,0 @@ exports.interfaces = require('./interfaces');

@@ -88,2 +88,9 @@

/**
* A test is considered slow if it
* exceeds the following value in milliseconds.
*/
exports.slow = 75;
/**
* Outut the given `failures` as a list.

@@ -149,8 +156,10 @@ *

stats.passes = stats.passes || 0;
// TODO: configurable
test.speed = test.duration < 20
? 'fast'
: test.duration < 75
var medium = exports.slow / 2;
test.speed = test.duration > exports.slow
? 'slow'
: test.duration > medium
? 'medium'
: 'slow';
: 'fast';
stats.passes++;

@@ -157,0 +166,0 @@ });

@@ -40,3 +40,7 @@

if (++n % width == 0) process.stdout.write('\n ');
process.stdout.write(color(test.speed, '.'));
if ('slow' == test.speed) {
process.stdout.write('\033[93m.\033[0m');
} else {
process.stdout.write(color(test.speed, '.'));
}
});

@@ -43,0 +47,0 @@

@@ -165,3 +165,4 @@

Runner.prototype.runTest = function(fn){
var test = this.test;
var test = this.test
, self = this;

@@ -171,3 +172,9 @@ // run the test

// async
if (test.async) return test.run(fn);
if (test.async) return test.run(function(err){
if (test.finished) {
self.fail(test, new Error('done() called multiple times'));
return;
}
fn(err);
});
// sync

@@ -174,0 +181,0 @@ process.nextTick(function(){

@@ -76,2 +76,3 @@

fn(err);
self.finished = true;
});

@@ -78,0 +79,0 @@ // sync

{
"name": "mocha"
, "version": "0.0.1-alpha2"
, "version": "0.0.1-alpha3"
, "description": "Test framework inspired by JSpec, Expresso, & Qunit"

@@ -9,3 +9,6 @@ , "keywords": ["test", "bdd", "tdd", "tap"]

, "main": "index"
, "bin": { "mocha": "./bin/mocha" }
, "bin": {
"mocha": "./bin/mocha"
, "mocha-debug": "./bin/mocha-debug"
}
, "engines": { "node": ">= 0.4.x < 0.7.0" }

@@ -12,0 +15,0 @@ , "dependencies":{

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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