Explicitly pass in timing functions in mock clock integration specs
- This way we can make sure that clear stack always works no matter how long the suite in the spec is [fixes #153518103]
This commit is contained in:
@@ -112,7 +112,7 @@ getJasmineRequireObj().util = function(j$) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function errorWithStack() {
|
||||
util.errorWithStack = function errorWithStack () {
|
||||
// Don't throw and catch if we don't have to, because it makes it harder
|
||||
// for users to debug their code with exception breakpoints.
|
||||
var error = new Error();
|
||||
@@ -127,10 +127,10 @@ getJasmineRequireObj().util = function(j$) {
|
||||
} catch (e) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function callerFile() {
|
||||
var trace = new j$.StackTrace(errorWithStack());
|
||||
var trace = new j$.StackTrace(util.errorWithStack());
|
||||
return trace.frames[2].file;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user