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.7.0 to 0.7.1

bin/_mocha

62

_mocha.js

@@ -794,2 +794,15 @@

process.stdout.write('\033[?25h');
},
deleteLine: function(){
process.stdout.write('\033[2K');
},
beginningOfLine: function(){
process.stdout.write('\033[0G');
},
CR: function(){
exports.cursor.deleteLine();
exports.cursor.beginningOfLine();
}

@@ -1083,3 +1096,4 @@ };

, utils = require('../utils')
, Progress = require('../browser/progress');
, Progress = require('../browser/progress')
, escape = utils.escape;

@@ -1122,3 +1136,4 @@ /**

, canvas = stat.find('canvas').get(0)
, ctx, progress
, progress
, ctx

@@ -1132,5 +1147,3 @@ if (canvas.getContext) {

if (progress) {
progress.size(50);
}
if (progress) progress.size(50);

@@ -1163,3 +1176,2 @@ runner.on('suite', function(suite){

if (progress) {
// update progress bar
progress.update(percent).draw(ctx);

@@ -1176,7 +1188,7 @@ }

if (test.passed) {
var el = $('<div class="test pass"><h2>' + test.title + '</h2></div>')
var el = $('<div class="test pass"><h2>' + escape(test.title) + '</h2></div>')
} else if (test.pending) {
var el = $('<div class="test pass pending"><h2>' + test.title + '</h2></div>')
var el = $('<div class="test pass pending"><h2>' + escape(test.title) + '</h2></div>')
} else {
var el = $('<div class="test fail"><h2>' + test.title + '</h2></div>');
var el = $('<div class="test fail"><h2>' + escape(test.title) + '</h2></div>');
var str = test.err.stack || test.err;

@@ -1186,8 +1198,5 @@

// check for the result of the stringifying.
if ('[object Error]' == str) {
str = test.err.message;
}
if ('[object Error]' == str) str = test.err.message;
var err = $('<pre class="error">' + str + '</pre>');
el.append(err);
$('<pre class="error">' + escape(str) + '</pre>').appendTo(el);
}

@@ -1205,3 +1214,3 @@

if (!test.pending) {
var code = utils.escape(clean(test.fn.toString()));
var code = escape(clean(test.fn.toString()));
var pre = $('<pre><code>' + code + '</code></pre>');

@@ -1502,2 +1511,3 @@ pre.appendTo(el).hide();

var Base = require('./base')
, cursor = Base.cursor
, color = Base.color;

@@ -1543,7 +1553,9 @@

+ color(test.speed, '%dms');
console.log('\r' + fmt, test.fullTitle(), test.duration);
cursor.CR();
console.log(fmt, test.fullTitle(), test.duration);
});
runner.on('fail', function(test, err){
console.log('\r' + color('fail', ' %d) %s'), n++, test.fullTitle());
cursor.CR();
console.log(color('fail', ' %d) %s'), n++, test.fullTitle());
});

@@ -1561,2 +1573,3 @@

}); // module: reporters/list.js

@@ -1625,3 +1638,4 @@

process.stdout.write('\r\033[J');
cursor.CR();
process.stdout.write('\033[J');
process.stdout.write(color('progress', ' ' + options.open));

@@ -1652,2 +1666,3 @@ process.stdout.write(Array(n).join(options.complete));

}); // module: reporters/progress.js

@@ -1662,2 +1677,3 @@

var Base = require('./base')
, cursor = Base.cursor
, color = Base.color;

@@ -1718,3 +1734,4 @@

+ color('pass', ' %s ');
console.log('\r' + fmt, test.title);
cursor.CR();
console.log(fmt, test.title);
} else {

@@ -1725,3 +1742,4 @@ var fmt = indent()

+ color(test.speed, '(%dms)');
console.log('\r' + fmt, test.title, test.duration);
cursor.CR();
console.log(fmt, test.title, test.duration);
}

@@ -1731,3 +1749,4 @@ });

runner.on('fail', function(test, err){
console.log('\r' + indent() + color('fail', ' %d) %s'), n++, test.title);
cursor.CR();
console.log(indent() + color('fail', ' %d) %s'), n++, test.title);
});

@@ -1745,2 +1764,3 @@

}); // module: reporters/spec.js

@@ -1747,0 +1767,0 @@

0.7.1 / 2011-12-22
==================
* Removed `mocha-debug(1)`, use `mocha --debug`
* Fixed CWD relative requires
* Fixed growl issue on windows [Raynos]
* Fixed: platform specific line endings [TooTallNate]
* Fixed: escape strings in HTML reporter. Closes #164
0.7.0 / 2011-12-18

@@ -3,0 +12,0 @@ ==================

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

exports.version = '0.7.0';
exports.version = '0.7.1';

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

@@ -91,2 +91,15 @@

process.stdout.write('\033[?25h');
},
deleteLine: function(){
process.stdout.write('\033[2K');
},
beginningOfLine: function(){
process.stdout.write('\033[0G');
},
CR: function(){
exports.cursor.deleteLine();
exports.cursor.beginningOfLine();
}

@@ -93,0 +106,0 @@ };

@@ -8,3 +8,4 @@

, utils = require('../utils')
, Progress = require('../browser/progress');
, Progress = require('../browser/progress')
, escape = utils.escape;

@@ -47,3 +48,4 @@ /**

, canvas = stat.find('canvas').get(0)
, ctx, progress
, progress
, ctx

@@ -57,5 +59,3 @@ if (canvas.getContext) {

if (progress) {
progress.size(50);
}
if (progress) progress.size(50);

@@ -88,3 +88,2 @@ runner.on('suite', function(suite){

if (progress) {
// update progress bar
progress.update(percent).draw(ctx);

@@ -101,7 +100,7 @@ }

if (test.passed) {
var el = $('<div class="test pass"><h2>' + test.title + '</h2></div>')
var el = $('<div class="test pass"><h2>' + escape(test.title) + '</h2></div>')
} else if (test.pending) {
var el = $('<div class="test pass pending"><h2>' + test.title + '</h2></div>')
var el = $('<div class="test pass pending"><h2>' + escape(test.title) + '</h2></div>')
} else {
var el = $('<div class="test fail"><h2>' + test.title + '</h2></div>');
var el = $('<div class="test fail"><h2>' + escape(test.title) + '</h2></div>');
var str = test.err.stack || test.err;

@@ -111,8 +110,5 @@

// check for the result of the stringifying.
if ('[object Error]' == str) {
str = test.err.message;
}
if ('[object Error]' == str) str = test.err.message;
var err = $('<pre class="error">' + str + '</pre>');
el.append(err);
$('<pre class="error">' + escape(str) + '</pre>').appendTo(el);
}

@@ -130,3 +126,3 @@

if (!test.pending) {
var code = utils.escape(clean(test.fn.toString()));
var code = escape(clean(test.fn.toString()));
var pre = $('<pre><code>' + code + '</code></pre>');

@@ -133,0 +129,0 @@ pre.appendTo(el).hide();

@@ -7,2 +7,3 @@

var Base = require('./base')
, cursor = Base.cursor
, color = Base.color;

@@ -48,7 +49,9 @@

+ color(test.speed, '%dms');
console.log('\r' + fmt, test.fullTitle(), test.duration);
cursor.CR();
console.log(fmt, test.fullTitle(), test.duration);
});
runner.on('fail', function(test, err){
console.log('\r' + color('fail', ' %d) %s'), n++, test.fullTitle());
cursor.CR();
console.log(color('fail', ' %d) %s'), n++, test.fullTitle());
});

@@ -63,2 +66,2 @@

List.prototype.__proto__ = Base.prototype;
List.prototype.__proto__ = Base.prototype;

@@ -61,3 +61,4 @@

process.stdout.write('\r\033[J');
cursor.CR();
process.stdout.write('\033[J');
process.stdout.write(color('progress', ' ' + options.open));

@@ -85,2 +86,2 @@ process.stdout.write(Array(n).join(options.complete));

Progress.prototype.__proto__ = Base.prototype;
Progress.prototype.__proto__ = Base.prototype;

@@ -7,2 +7,3 @@

var Base = require('./base')
, cursor = Base.cursor
, color = Base.color;

@@ -63,3 +64,4 @@

+ color('pass', ' %s ');
console.log('\r' + fmt, test.title);
cursor.CR();
console.log(fmt, test.title);
} else {

@@ -70,3 +72,4 @@ var fmt = indent()

+ color(test.speed, '(%dms)');
console.log('\r' + fmt, test.title, test.duration);
cursor.CR();
console.log(fmt, test.title, test.duration);
}

@@ -76,3 +79,4 @@ });

runner.on('fail', function(test, err){
console.log('\r' + indent() + color('fail', ' %d) %s'), n++, test.title);
cursor.CR();
console.log(indent() + color('fail', ' %d) %s'), n++, test.title);
});

@@ -87,2 +91,2 @@

Spec.prototype.__proto__ = Base.prototype;
Spec.prototype.__proto__ = Base.prototype;

@@ -796,2 +796,15 @@ ;(function(){

process.stdout.write('\033[?25h');
},
deleteLine: function(){
process.stdout.write('\033[2K');
},
beginningOfLine: function(){
process.stdout.write('\033[0G');
},
CR: function(){
exports.cursor.deleteLine();
exports.cursor.beginningOfLine();
}

@@ -1085,3 +1098,4 @@ };

, utils = require('../utils')
, Progress = require('../browser/progress');
, Progress = require('../browser/progress')
, escape = utils.escape;

@@ -1124,3 +1138,4 @@ /**

, canvas = stat.find('canvas').get(0)
, ctx, progress
, progress
, ctx

@@ -1134,5 +1149,3 @@ if (canvas.getContext) {

if (progress) {
progress.size(50);
}
if (progress) progress.size(50);

@@ -1165,3 +1178,2 @@ runner.on('suite', function(suite){

if (progress) {
// update progress bar
progress.update(percent).draw(ctx);

@@ -1178,7 +1190,7 @@ }

if (test.passed) {
var el = $('<div class="test pass"><h2>' + test.title + '</h2></div>')
var el = $('<div class="test pass"><h2>' + escape(test.title) + '</h2></div>')
} else if (test.pending) {
var el = $('<div class="test pass pending"><h2>' + test.title + '</h2></div>')
var el = $('<div class="test pass pending"><h2>' + escape(test.title) + '</h2></div>')
} else {
var el = $('<div class="test fail"><h2>' + test.title + '</h2></div>');
var el = $('<div class="test fail"><h2>' + escape(test.title) + '</h2></div>');
var str = test.err.stack || test.err;

@@ -1188,8 +1200,5 @@

// check for the result of the stringifying.
if ('[object Error]' == str) {
str = test.err.message;
}
if ('[object Error]' == str) str = test.err.message;
var err = $('<pre class="error">' + str + '</pre>');
el.append(err);
$('<pre class="error">' + escape(str) + '</pre>').appendTo(el);
}

@@ -1207,3 +1216,3 @@

if (!test.pending) {
var code = utils.escape(clean(test.fn.toString()));
var code = escape(clean(test.fn.toString()));
var pre = $('<pre><code>' + code + '</code></pre>');

@@ -1504,2 +1513,3 @@ pre.appendTo(el).hide();

var Base = require('./base')
, cursor = Base.cursor
, color = Base.color;

@@ -1545,7 +1555,9 @@

+ color(test.speed, '%dms');
console.log('\r' + fmt, test.fullTitle(), test.duration);
cursor.CR();
console.log(fmt, test.fullTitle(), test.duration);
});
runner.on('fail', function(test, err){
console.log('\r' + color('fail', ' %d) %s'), n++, test.fullTitle());
cursor.CR();
console.log(color('fail', ' %d) %s'), n++, test.fullTitle());
});

@@ -1563,2 +1575,3 @@

}); // module: reporters/list.js

@@ -1627,3 +1640,4 @@

process.stdout.write('\r\033[J');
cursor.CR();
process.stdout.write('\033[J');
process.stdout.write(color('progress', ' ' + options.open));

@@ -1654,2 +1668,3 @@ process.stdout.write(Array(n).join(options.complete));

}); // module: reporters/progress.js

@@ -1664,2 +1679,3 @@

var Base = require('./base')
, cursor = Base.cursor
, color = Base.color;

@@ -1720,3 +1736,4 @@

+ color('pass', ' %s ');
console.log('\r' + fmt, test.title);
cursor.CR();
console.log(fmt, test.title);
} else {

@@ -1727,3 +1744,4 @@ var fmt = indent()

+ color(test.speed, '(%dms)');
console.log('\r' + fmt, test.title, test.duration);
cursor.CR();
console.log(fmt, test.title, test.duration);
}

@@ -1733,3 +1751,4 @@ });

runner.on('fail', function(test, err){
console.log('\r' + indent() + color('fail', ' %d) %s'), n++, test.title);
cursor.CR();
console.log(indent() + color('fail', ' %d) %s'), n++, test.title);
});

@@ -1747,2 +1766,3 @@

}); // module: reporters/spec.js

@@ -1749,0 +1769,0 @@

{
"name": "mocha"
, "version": "0.7.0"
, "version": "0.7.1"
, "description": "simple, flexible, fun test framework"
, "keywords": ["test", "bdd", "tdd", "tap"]
, "bin": { "mocha": "./bin/mocha" }
, "author": "TJ Holowaychuk <tj@vision-media.ca>"
, "main": "index"
, "bin": {
"mocha": "./bin/mocha"
, "mocha-debug": "./bin/mocha-debug"
}
, "bin": { "mocha": "./bin/mocha", "_mocha": "./bin/_mocha" }
, "engines": { "node": ">= 0.4.x < 0.7.0" }

@@ -14,0 +10,0 @@ , "scripts": {

@@ -6,1 +6,23 @@ [![Build Status](https://secure.travis-ci.org/visionmedia/mocha.png)](http://travis-ci.org/visionmedia/mocha)

Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://visionmedia.github.com/mocha).
## Contributors
```
project: mocha
commits: 440
files : 84
authors:
334 Tj Holowaychuk 75.9%
69 TJ Holowaychuk 15.7%
20 Guillermo Rauch 4.5%
6 James Carr 1.4%
2 Quang Van 0.5%
2 FARKAS Máté 0.5%
1 Ben Lindsey 0.2%
1 hokaccha 0.2%
1 David Henderson 0.2%
1 Fredrik Lindin 0.2%
1 Harry Brundage 0.2%
1 Konstantin Käfer 0.2%
1 Steve Mason 0.2%
```

@@ -20,5 +20,8 @@ describe('Array', function(){

describe('#pop()', function(){
it('should remove and return the last value', function(){
it('should remove and return the last value', function(done){
var arr = [1,2,3];
assert(arr.pop() == 3);
setTimeout(function(){
doesNotExist();
}, 0);
})

@@ -25,0 +28,0 @@

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