Comparing version 0.10.2 to 0.11.0
@@ -1,2 +0,2 @@ | ||
Nodeunit contributors (sorted alphabeticaly) | ||
Nodeunit contributors (sorted alphabetically) | ||
============================================ | ||
@@ -3,0 +3,0 @@ |
@@ -1943,2 +1943,3 @@ /*! | ||
exports.run = function (modules, options) { | ||
options = options || {}; | ||
var start = new Date().getTime(); | ||
@@ -1945,0 +1946,0 @@ var textareas = options.textareas; |
@@ -175,7 +175,12 @@ /** | ||
// 7.1. All identical values are equivalent, as determined by ===. | ||
if (actual === expected) { | ||
if (actual === expected) | ||
return true; | ||
// Convert to primitives, if supported | ||
actual = actual.valueOf ? actual.valueOf() : actual; | ||
expected = expected.valueOf ? expected.valueOf() : expected; | ||
// 7.2. If the expected value is a Date object, the actual value is | ||
// equivalent if it is also a Date object that refers to the same time. | ||
} else if (actual instanceof Date && expected instanceof Date) { | ||
if (actual instanceof Date && expected instanceof Date) { | ||
return actual.getTime() === expected.getTime(); | ||
@@ -229,2 +234,3 @@ | ||
return false; | ||
// an identical "prototype" property. | ||
@@ -231,0 +237,0 @@ if (a.prototype !== b.prototype) return false; |
@@ -54,2 +54,4 @@ /*! | ||
}; | ||
var pass_indicator = process.platform === 'win32' ? '\u221A' : '✔'; | ||
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖'; | ||
@@ -84,6 +86,6 @@ var start = new Date().getTime(); | ||
if (!assertions.failures()) { | ||
console.log('✔ ' + name); | ||
console.log(pass_indicator + ' ' + name); | ||
} | ||
else { | ||
console.log(error('✖ ' + name) + '\n'); | ||
console.log(error(fail_indicator + ' ' + name) + '\n'); | ||
assertions.forEach(function (a) { | ||
@@ -90,0 +92,0 @@ if (a.failed()) { |
@@ -18,3 +18,3 @@ /*! | ||
child_process = require('child_process'), | ||
ejs = require('../../deps/ejs'); | ||
ejs = require('ejs'); | ||
@@ -21,0 +21,0 @@ |
@@ -55,2 +55,3 @@ /*! | ||
}; | ||
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖'; | ||
@@ -90,3 +91,3 @@ var spaces_per_indent = options.spaces_per_indent || 4; | ||
var fail_text = function (txt) { | ||
return bold(error(txt + " (fail) ✖ ")); | ||
return bold(error(txt + " (fail) " + fail_indicator + " ")); | ||
}; | ||
@@ -93,0 +94,0 @@ |
@@ -52,2 +52,4 @@ /*! | ||
}; | ||
var pass_indicator = process.platform === 'win32' ? '\u221A' : '✔'; | ||
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖'; | ||
@@ -67,3 +69,3 @@ var start = new Date().getTime(); | ||
if (assertions.failures()) { | ||
console.log(error('✖ ' + name) + '\n'); | ||
console.log(error(fail_indicator + ' ' + name) + '\n'); | ||
assertions.forEach(function (a) { | ||
@@ -84,6 +86,6 @@ if (a.failed()) { | ||
if (!assertions.failures()) { | ||
console.log('✔ all tests passed'); | ||
console.log(pass_indicator + ' all tests passed'); | ||
} | ||
else { | ||
console.log(error('✖ some tests failed')); | ||
console.log(error(fail_indicator + ' some tests failed')); | ||
} | ||
@@ -90,0 +92,0 @@ }, |
@@ -54,2 +54,4 @@ /*! | ||
}; | ||
var pass_indicator = process.platform === 'win32' ? '\u221A' : '✔'; | ||
var fail_indicator = process.platform === 'win32' ? '\u00D7' : '✖'; | ||
@@ -86,6 +88,6 @@ var start = new Date().getTime(); | ||
if (!assertions.failures()) { | ||
console.log('✔ ' + name); | ||
console.log(pass_indicator + ' ' + name); | ||
} | ||
else { | ||
console.log(error('✖ ' + name)); | ||
console.log(error(fail_indicator + ' ' + name)); | ||
} | ||
@@ -95,3 +97,3 @@ // verbose so print everything | ||
if (a.failed()) { | ||
console.log(error(' ✖ ' + a.message)); | ||
console.log(error(' ' + fail_indicator + ' ' + a.message)); | ||
a = utils.betterErrors(a); | ||
@@ -101,3 +103,3 @@ console.log(' ' + a.error.stack); | ||
else { | ||
console.log(' ✔ ' + a.message); | ||
console.log(' ' + pass_indicator + ' ' + a.message); | ||
} | ||
@@ -104,0 +106,0 @@ }); |
{ | ||
"name": "nodeunit", | ||
"version": "0.10.2", | ||
"version": "0.11.0", | ||
"description": "Easy unit testing for node.js and the browser.", | ||
@@ -66,4 +66,4 @@ "maintainers": [ | ||
"devDependencies": { | ||
"uglify-js": ">=2.7.3", | ||
"should": ">=11.1.0" | ||
"should": ">=11.1.0", | ||
"uglify-js": ">=2.7.3" | ||
}, | ||
@@ -83,3 +83,4 @@ "bugs": { | ||
"dependencies": { | ||
"tap": "^7.0.0" | ||
"ejs": "^2.5.2", | ||
"tap": "^10.0.2" | ||
}, | ||
@@ -86,0 +87,0 @@ "scripts": { |
Nodeunit | ||
======== | ||
[![Build Status](https://travis-ci.org/caolan/nodeunit.svg?branch=master)](https://travis-ci.org/caolan/nodeunit) | ||
Simple syntax, powerful tools. Nodeunit provides easy async unit testing for | ||
@@ -5,0 +7,0 @@ node.js and the browser. |
@@ -118,3 +118,4 @@ /* | ||
exports.testDeepEqual = makeTest('deepEqual', | ||
[{one: 1}, {one: 1}], [{one: 1}, {two: 2}] | ||
[{one: 1, two: 2}, {one: 1, two: {valueOf:function() {return 2;}}}], | ||
[{one: 1, two: 2}, {two: 2}] | ||
); | ||
@@ -121,0 +122,0 @@ exports.testNotDeepEqual = makeTest('notDeepEqual', |
var exec = require('child_process').exec, | ||
path = require('path'); | ||
var bin = path.resolve(__dirname, '../bin/nodeunit'); | ||
var bin = (process.platform === 'win32' ? 'node ' : "") + | ||
path.resolve(__dirname, '../bin/nodeunit'); | ||
var testfile_fullpath = path.resolve(__dirname, './fixtures/example_test.js'); | ||
@@ -6,0 +7,0 @@ var fixtures_path = path.resolve(__dirname, './fixtures'); |
Sorry, the diff of this file is not supported yet
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2
471
25
3
750879
2
68
6818
+ Addedejs@^2.5.2
+ Addedbind-obj-methods@1.0.0(transitive)
+ Addedejs@2.7.4(transitive)
+ Addedescape-string-regexp@2.0.0(transitive)
+ Addedfs-exists-cached@1.0.0(transitive)
+ Addedfunction-loop@1.0.2(transitive)
+ Addednyc@11.9.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedown-or@1.0.0(transitive)
+ Addedown-or-env@1.0.2(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedstack-utils@1.0.5(transitive)
+ Addedtap@10.7.3(transitive)
+ Addedtap-mocha-reporter@3.0.9(transitive)
+ Addedtap-parser@5.4.0(transitive)
+ Addedtmatch@3.1.0(transitive)
+ Addedtrivial-deferred@1.1.2(transitive)
+ Addedtsame@1.1.2(transitive)
+ Addedyapool@1.0.0(transitive)
- Removeddeeper@2.1.0(transitive)
- Removedisexe@1.1.2(transitive)
- Removednyc@7.1.0(transitive)
- Removedonly-shallow@1.2.0(transitive)
- Removedos-homedir@1.0.1(transitive)
- Removedstack-utils@0.4.0(transitive)
- Removedtap@7.1.2(transitive)
- Removedtap-mocha-reporter@2.0.1(transitive)
- Removedtap-parser@2.2.3(transitive)
- Removedtmatch@2.0.1(transitive)
Updatedtap@^10.0.2