Removed unnecessary errorWithStack helper
This commit is contained in:
@@ -48,16 +48,9 @@ getJasmineRequireObj().util = function(j$) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||
};
|
||||
|
||||
util.errorWithStack = function errorWithStack() {
|
||||
// Don't throw and catch. That makes it harder for users to debug their
|
||||
// code with exception breakpoints, and it's unnecessary since all
|
||||
// supported environments populate new Error().stack
|
||||
return new Error();
|
||||
};
|
||||
|
||||
function callerFile() {
|
||||
const trace = new j$.StackTrace(util.errorWithStack());
|
||||
return trace.frames[2].file;
|
||||
const trace = new j$.StackTrace(new Error());
|
||||
return trace.frames[1].file;
|
||||
}
|
||||
|
||||
util.jasmineFile = (function() {
|
||||
|
||||
Reference in New Issue
Block a user