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

testing

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testing - npm Package Compare versions

Comparing version 0.0.17 to 0.1.0

35

lib/runner.js

@@ -300,3 +300,8 @@ 'use strict';

{
var subResult = new TestResult(key);
var testKey = key;
if (isNumber(key) && value.name)
{
testKey = value.name;
}
var subResult = new TestResult(testKey);
// it is a function to run

@@ -369,2 +374,7 @@ next = getNext(key, subResult, callback);

},
g: [function(callback) {
callback(null, 'g0');
}, function two(callback) {
callback(null, 'g1');
}],
};

@@ -385,2 +395,10 @@ exports.run(series, function(error, result)

console.assert(result.results.b.results.e.message == 'e', 'Should have a e for b.e');
console.assert(result.results.g, 'Should have result for g');
console.assert(result.results.g.success, 'Should have success for g');
console.assert(result.results.g.results[0], 'Should have result for g[0]');
console.assert(result.results.g.results[0].success, 'Should have success for g[0]');
console.assert(result.results.g.results[0].message == 'g0', 'Should have g0 for g[0]');
console.assert(result.results.g.results.two, 'Should have result for two');
console.assert(result.results.g.results.two.success, 'Should have success for two');
console.assert(result.results.g.results.two.message == 'g1', 'Should have g1 for two');
log.info('Test run successful with 2 failures: %s', result);

@@ -456,7 +474,18 @@ });

{
console.assert(isEmpty({}), 'Empty should be empty');
console.assert(!isEmpty({a: 'a'}), 'Not empty is empty');
console.assert(isEmpty({}), 'Empty object should be empty');
console.assert(!isEmpty({a: 'a'}), 'Not empty object is empty');
console.assert(isEmpty([]), 'Empty array should be empty');
console.assert(!isEmpty(['a']), 'Not empty array is empty');
}
/**
* Find out if the argument is a number.
* http://stackoverflow.com/a/1830844/978796
*/
function isNumber(n)
{
return !isNaN(parseFloat(n)) && isFinite(n);
}
/**
* Run all module tests.

@@ -463,0 +492,0 @@ * Cannot use testing since it is not defined yet.

2

package.json
{
"name": "testing",
"version": "0.0.17",
"version": "0.1.0",
"description": "Simple asynchronous testing framework. Never again count your asserts! This tiny testing library is fully callback-based and has a rich API for asserts.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/testing",

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