Socket
Socket
Sign inDemoInstall

mocha

Package Overview
Dependencies
6
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.12.1 to 0.13.0

coverage.html

11

History.md
0.13.0 / 2012-02-23
==================
* Added preliminary test coverage support. Closes #5
* Added `HTMLCov` reporter
* Added `JSONCov` reporter [kunklejr]
* Added `xdescribe()` and `xit()` to the BDD interface. Closes #263 (docs * Changed: make json reporter output pretty json
* Fixed node-inspector support, swapped `--debug` for `debug` to match node.
needed)
Closes #247
0.12.1 / 2012-02-14

@@ -3,0 +14,0 @@ ==================

4

index.js
module.exports = require('./lib/mocha');
module.exports = process.env.COV
? require('./lib-cov/mocha')
: require('./lib/mocha');

@@ -31,2 +31,7 @@

// noop variants
context.xdescribe = function(){};
context.xit = function(){};
/**

@@ -33,0 +38,0 @@ * Execute before running tests.

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

exports.version = '0.12.1';
exports.version = '0.13.0';

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

@@ -95,3 +95,3 @@

// test
if (test.passed) {
if ('passed' == test.state) {
var el = $('<div class="test pass"><h2>' + escape(test.title) + '</h2></div>')

@@ -98,0 +98,0 @@ } else if (test.pending) {

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

exports.Landing = require('./landing');
exports.JSONCov = require('./json-cov');
exports.HTMLCov = require('./html-cov');
exports.JSONStream = require('./json-stream');
exports.XUnit = require('./xunit')

@@ -51,3 +51,3 @@

process.stdout.write(JSON.stringify(obj));
process.stdout.write(JSON.stringify(obj, null, 2));
});

@@ -54,0 +54,0 @@ }

@@ -70,3 +70,3 @@

// show the crash
if (test.failed) {
if ('failed' == test.state) {
plane = color('plane crash', '✈');

@@ -73,0 +73,0 @@ crashed = col;

@@ -66,3 +66,3 @@

if (test.failed) {
if ('failed' == test.state) {
var err = test.err;

@@ -69,0 +69,0 @@ attrs.message = escape(err.message);

@@ -118,3 +118,3 @@

++this.failures;
test.failed = true;
test.state = 'failed';
this.emit('fail', test, err);

@@ -326,3 +326,3 @@ };

test.passed = true;
test.state = 'passed';
self.emit('pass', test);

@@ -384,3 +384,3 @@ self.emit('test end', test);

var runnable = this.currentRunnable;
if (runnable.failed) return;
if ('failed' == runnable.state) return;
runnable.clearTimeout();

@@ -387,0 +387,0 @@ err.uncaught = true;

@@ -117,5 +117,5 @@

for (var i in obj) {
if (has.call(obj, i)) {
keys.push(i);
for (var key in obj) {
if (has.call(obj, key)) {
keys.push(key);
}

@@ -122,0 +122,0 @@ }

{
"name": "mocha"
, "version": "0.12.1"
, "version": "0.13.0"
, "description": "simple, flexible, fun test framework"

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

, "repository": { "type": "git", "url": "git://github.com/visionmedia/mocha.git" }
, "main": "index"
, "main": "./index"
, "bin": { "mocha": "./bin/mocha", "_mocha": "./bin/_mocha" }

@@ -18,2 +18,3 @@ , "engines": { "node": ">= 0.4.x < 0.8.0" }

, "growl": "1.5.x"
, "jade": "0.20.3"
, "debug": "*"

@@ -20,0 +21,0 @@ }

@@ -63,6 +63,6 @@

it('should set test.failed to true', function(){
it('should set test.state to "failed"', function(){
var test = {};
runner.fail(test, 'some error');
test.failed.should.be.true;
test.state.should.equal('failed');
})

@@ -69,0 +69,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc