deadunit-core
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -532,2 +532,4 @@ "use strict"; | ||
var file, line, column; | ||
return getSourceMapConsumer(info.file, warningHandler).catch(function(e){ | ||
@@ -541,23 +543,24 @@ warningHandler(e) | ||
var mappedInfo = getMappedSourceInfo(sourceMapConsumer, info.file, info.line, info.column) | ||
var file = mappedInfo.file | ||
var line = mappedInfo.line | ||
var column = mappedInfo.column | ||
file = mappedInfo.file | ||
line = mappedInfo.line | ||
column = mappedInfo.column | ||
var multiLineSearch = !mappedInfo.usingOriginalFile // don't to a multi-line search if the source has been mapped (the file might not be javascript) | ||
var sourceLines = getFunctionCallLines(mappedInfo.file, functionName, mappedInfo.line, multiLineSearch, warningHandler) | ||
return getFunctionCallLines(mappedInfo.file, functionName, mappedInfo.line, multiLineSearch, warningHandler) | ||
} else { | ||
var file = info.file | ||
var line = info.line | ||
var column = info.column | ||
var sourceLines = getFunctionCallLines(file, functionName, line, true, warningHandler) | ||
file = info.file | ||
line = info.line | ||
column = info.column | ||
return getFunctionCallLines(file, functionName, line, true, warningHandler) | ||
} | ||
return sourceLines.then(function(sourceLines) { | ||
return Future({ | ||
sourceLines: sourceLines, | ||
file: path.basename(file), | ||
line: line, | ||
column: column | ||
}) | ||
}).catch(function(e) { | ||
warningHandler(e) | ||
return Future("<source not available>") | ||
}).then(function(sourceLines) { | ||
return Future({ | ||
sourceLines: sourceLines, | ||
file: path.basename(file), | ||
line: line, | ||
column: column | ||
}) | ||
@@ -608,3 +611,3 @@ }) | ||
file: file, | ||
fn: fn, | ||
function: fn, | ||
line: line, | ||
@@ -640,2 +643,3 @@ column: column, | ||
return Future("<source not available>") | ||
}) | ||
@@ -725,3 +729,3 @@ } | ||
if(sourceMapConsumers[n] !== undefined) { | ||
info = getMappedSourceInfo(sourceMapConsumers[n], info.file, info.line, info.column, info.fn) | ||
info = getMappedSourceInfo(sourceMapConsumers[n], info.file, info.line, info.column, info.function) | ||
} | ||
@@ -738,4 +742,4 @@ | ||
var traceLine = " at " | ||
if(info.fn !== undefined) { | ||
traceLine += info.fn+' ('+fileLineColumn+')' | ||
if(info.function !== undefined) { | ||
traceLine += info.function+' ('+fileLineColumn+')' | ||
} else { | ||
@@ -742,0 +746,0 @@ traceLine += fileLineColumn |
{ | ||
"name": "deadunit-core", | ||
"version": "5.0.2", | ||
"version": "5.0.5", | ||
"dependencies": { | ||
"ajax": { | ||
"version": "1.0.2", | ||
"from": "https://github.com/fresheneesz/ajax/archive/c0f12d10544a247bfa58b15e9535ee2ffd5787d1.tar.gz", | ||
"resolved": "https://github.com/fresheneesz/ajax/archive/c0f12d10544a247bfa58b15e9535ee2ffd5787d1.tar.gz", | ||
"version": "1.0.3", | ||
"from": "https://github.com/fresheneesz/ajax/archive/28d7ca2a922446ad9d2eae7d1bc615f3dbeb2f57.tar.gz", | ||
"resolved": "https://github.com/fresheneesz/ajax/archive/28d7ca2a922446ad9d2eae7d1bc615f3dbeb2f57.tar.gz", | ||
"dependencies": { | ||
@@ -88,5 +88,5 @@ "async-future": { | ||
"stackinfo": { | ||
"version": "1.1.2", | ||
"from": "stackinfo@1.1.2", | ||
"resolved": "https://registry.npmjs.org/stackinfo/-/stackinfo-1.1.2.tgz", | ||
"version": "1.1.3", | ||
"from": "stackinfo@1.1.3", | ||
"resolved": "https://registry.npmjs.org/stackinfo/-/stackinfo-1.1.3.tgz", | ||
"dependencies": { | ||
@@ -93,0 +93,0 @@ "stacktrace-js": { |
{"name":"deadunit-core", | ||
"description": "The core for deadunit - a dead-simple nestable unit testing library for javascript in node.js and the browser.", | ||
"keywords": ["unit", "test", "testing", "javascript", "node", "deadunit", "asynchronous"], | ||
"version":"5.0.4", | ||
"version":"5.0.5", | ||
"dependencies":{ | ||
"async-future":"1.0.0", | ||
"stack-trace":"0.0.7", | ||
"stackinfo":"1.1.2", | ||
"stackinfo":"1.1.3", | ||
"proto":"1.0.9", | ||
@@ -10,0 +10,0 @@ "source-map-resolve":"0.1.3", |
@@ -104,3 +104,3 @@ `deadunitCore` | ||
`this.eq(<actualValue>, <expectedValue>])` - shorthand for `this.ok(<actualValue> === <expectedValue>, <actualValue>, <expectedValue>). | ||
`this.eq(<actualValue>, <expectedValue>])` - shorthand for `this.ok(<actualValue> === <expectedValue>, <actualValue>, <expectedValue>)`. | ||
@@ -306,2 +306,3 @@ * `<actualValue>` - the "actual value" being tested. The test results will contain this information about the actual value. | ||
* 5.0.5 - updating stackinfo to support sourcemapping for newer versions of firefox (that have a new stacktrace format) | ||
* 5.0.4 | ||
@@ -308,0 +309,0 @@ * fixing memory leak that happened in certain rare error conditions |
@@ -23,2 +23,3 @@ | ||
//* | ||
@@ -98,3 +99,3 @@ this.test('browser-specific tests', function() { | ||
}) | ||
//*/ | ||
//*/ /* | ||
}) | ||
@@ -107,4 +108,4 @@ | ||
}) | ||
//Z*/ | ||
//*/ | ||
} | ||
} |
@@ -254,3 +254,3 @@ "use strict"; | ||
} else { | ||
var subtest3line = 7860 | ||
var subtest3line = 7872 | ||
this.ok(subtest3.line === subtest3line, subtest3.line) // browserify bug causes sourcemap to not be found | ||
@@ -257,0 +257,0 @@ } |
Sorry, the diff of this file is too big to display
1310765
16994
366
+ Addedstackinfo@1.1.3(transitive)
- Removedstackinfo@1.1.2(transitive)
Updatedstackinfo@1.1.3