diff --git a/lib/jasmine-core/boot.js b/lib/jasmine-core/boot.js index cd1a29a6..aa501180 100644 --- a/lib/jasmine-core/boot.js +++ b/lib/jasmine-core/boot.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2018 Pivotal Labs +Copyright (c) 2008-2019 Pivotal Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/lib/jasmine-core/jasmine-html.js b/lib/jasmine-core/jasmine-html.js index 3f808bf6..74a3b04b 100644 --- a/lib/jasmine-core/jasmine-html.js +++ b/lib/jasmine-core/jasmine-html.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2018 Pivotal Labs +Copyright (c) 2008-2019 Pivotal Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 9330bb70..27c27ca8 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2018 Pivotal Labs +Copyright (c) 2008-2019 Pivotal Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -877,11 +877,12 @@ getJasmineRequireObj().Env = function(j$) { if (!options.suppressLoadErrors) { installGlobalErrors(); - globalErrors.pushListener(function(message, filename, lineno) { + globalErrors.pushListener(function(message, filename, lineno, colNo, err) { topSuite.result.failedExpectations.push({ passed: false, globalErrorType: 'load', message: message, + stack: err && err.stack, filename: filename, lineno: lineno }); diff --git a/lib/jasmine-core/node_boot.js b/lib/jasmine-core/node_boot.js index 234b0a7f..921d3434 100644 --- a/lib/jasmine-core/node_boot.js +++ b/lib/jasmine-core/node_boot.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2018 Pivotal Labs +Copyright (c) 2008-2019 Pivotal Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index dc690984..37b25182 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -2046,6 +2046,7 @@ describe("Env integration", function() { passed: false, globalErrorType: 'load', message: 'Uncaught SyntaxError: Unexpected end of input', + stack: 'a stack', filename: 'borkenSpec.js', lineno: 42 }, @@ -2053,6 +2054,7 @@ describe("Env integration", function() { passed: false, globalErrorType: 'load', message: 'Uncaught Error: ENOCHEESE', + stack: undefined, filename: undefined, lineno: undefined } @@ -2062,7 +2064,7 @@ describe("Env integration", function() { }); env.addReporter(reporter); - global.onerror('Uncaught SyntaxError: Unexpected end of input', 'borkenSpec.js', 42); + global.onerror('Uncaught SyntaxError: Unexpected end of input', 'borkenSpec.js', 42, undefined, {stack: 'a stack'}); global.onerror('Uncaught Error: ENOCHEESE'); env.execute(); diff --git a/src/core/Env.js b/src/core/Env.js index 3b9c2b97..02476268 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -100,11 +100,12 @@ getJasmineRequireObj().Env = function(j$) { if (!options.suppressLoadErrors) { installGlobalErrors(); - globalErrors.pushListener(function(message, filename, lineno) { + globalErrors.pushListener(function(message, filename, lineno, colNo, err) { topSuite.result.failedExpectations.push({ passed: false, globalErrorType: 'load', message: message, + stack: err && err.stack, filename: filename, lineno: lineno });