doublescore
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -28,2 +28,4 @@ 'use strict'; | ||
var lastCall = null; | ||
return function ( err, data ) { | ||
@@ -35,6 +37,12 @@ | ||
err = new Error( 'max callbacks ' + params.max ); | ||
err = new Error( 'max callbacks ' + params.max + ' after last call: ' + JSON.stringify( lastCall ) ); | ||
if ( params.maxLog ) { | ||
console.error( err.stack); | ||
var stack = err.stack; | ||
// don't need the line number inside doublescore to appear in trace | ||
stack = stack.replace( /\n[^\n]*\n/, "\n" ); | ||
console.error( stack ); | ||
} else if ( params.maxException ) { | ||
@@ -47,2 +55,4 @@ throw err; | ||
lastCall = arguments; | ||
if ( timeout ) { | ||
@@ -49,0 +59,0 @@ clearTimeout( timeout ); |
@@ -5,3 +5,3 @@ { | ||
"author": "Anthony Hildoer <anthony@bluerival.com>", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -87,3 +87,3 @@ 'use strict'; | ||
var expectedMessage = "Error: max callbacks 1\n at /Users/ahildoer/src/BlueRival/doublescore/lib/close.js:34:12\n at Context.<anonymous> (/Users/ahildoer/src/BlueRival/doublescore/test/close.js:#:3)\n at callFn (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runnable.js:286:21)\n at Test.Runnable.run (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runnable.js:279:7)\n at Runner.runTest (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:421:10)\n at /Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:528:12\n at next (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:341:14)\n at /Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:351:7\n at next (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:283:14)\n at Immediate._onImmediate (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:319:5)\n at processImmediate [as _immediateCallback] (timers.js:383:17)"; | ||
var expectedMessage = "Error: max callbacks 1 after last call: {\"0\":null,\"1\":200}\n at Context.<anonymous> (/Users/ahildoer/src/BlueRival/doublescore/test/close.js:#:3)\n at callFn (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runnable.js:286:21)\n at Test.Runnable.run (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runnable.js:279:7)\n at Runner.runTest (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:421:10)\n at /Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:528:12\n at next (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:341:14)\n at /Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:351:7\n at next (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:283:14)\n at Immediate._onImmediate (/Users/ahildoer/src/BlueRival/doublescore/node_modules/mocha/lib/runner.js:319:5)\n at processImmediate [as _immediateCallback] (timers.js:383:17)"; | ||
@@ -90,0 +90,0 @@ cb( null, 200 ); |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
45089
1246
0