diff --git a/README.md b/README.md index 37b5c9c5..326b8775 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Jasmine tests itself across many browsers (Safari, Chrome, Firefox, Microsoft Ed | Environment | Supported versions | |-------------------|--------------------| | Node | 12.17+, 14, 16 | -| Safari | 13-14 | +| Safari | 13-15 | | Chrome | Evergreen | | Firefox | Evergreen, 68, 78, 91 | | Edge | Evergreen | @@ -58,6 +58,9 @@ For evergreen browsers, each version of Jasmine is tested against the version of at the time of release. Other browsers, as well as older & newer versions of some supported browsers, are likely to work. However, Jasmine isn't tested against them and they aren't actively supported. +See the [release notes](https://github.com/jasmine/jasmine/tree/main/release_notes) +for the supported environments for each Jasmine release. + ## Support * Search past discussions: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js). diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index b6301afd..1fadad3f 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -9414,7 +9414,7 @@ getJasmineRequireObj().StackTrace = function(j$) { // e.g. "run@http://localhost:8888/__jasmine__/jasmine.js:4320:27" // or "http://localhost:8888/__jasmine__/jasmine.js:4320:27" { - re: /^(([^@\s]+)@)?([^\s]+)$/, + re: /^(?:(([^@\s]+)@)|@)?([^\s]+)$/, fnIx: 2, fileLineColIx: 3, style: 'webkit' diff --git a/scripts/run-all-browsers b/scripts/run-all-browsers index 9443b777..5d6e254e 100755 --- a/scripts/run-all-browsers +++ b/scripts/run-all-browsers @@ -28,6 +28,7 @@ run_browser firefox latest run_browser firefox 91 run_browser firefox 78 run_browser firefox 68 +run_browser safari 15 run_browser safari 14 run_browser safari 13 run_browser MicrosoftEdge latest diff --git a/spec/core/StackTraceSpec.js b/spec/core/StackTraceSpec.js index 680a8ade..32ccc090 100644 --- a/spec/core/StackTraceSpec.js +++ b/spec/core/StackTraceSpec.js @@ -95,7 +95,7 @@ describe('StackTrace', function() { ]); }); - it('understands Safari/Firefox/Phantom-OS X style traces', function() { + it('understands Safari <=14/Firefox/Phantom-OS X style traces', function() { var error = { message: 'nope', stack: @@ -122,6 +122,33 @@ describe('StackTrace', function() { ]); }); + it('understands Safari 15 style traces', function() { + var error = { + message: 'nope', + stack: + '@http://localhost:8888/__spec__/core/FooSpec.js:164:24\n' + + 'attempt@http://localhost:8888/__jasmine__/jasmine.js:8074:44\n' + }; + var result = new jasmineUnderTest.StackTrace(error); + + expect(result.message).toBeFalsy(); + expect(result.style).toEqual('webkit'); + expect(result.frames).toEqual([ + { + raw: '@http://localhost:8888/__spec__/core/FooSpec.js:164:24', + func: undefined, + file: 'http://localhost:8888/__spec__/core/FooSpec.js', + line: 164 + }, + { + raw: 'attempt@http://localhost:8888/__jasmine__/jasmine.js:8074:44', + func: 'attempt', + file: 'http://localhost:8888/__jasmine__/jasmine.js', + line: 8074 + } + ]); + }); + it('does not mistake gibberish for Safari/Firefox/Phantom-OS X style traces', function() { var error = { message: 'nope', diff --git a/src/core/StackTrace.js b/src/core/StackTrace.js index c32ee8b2..32d9d1f2 100644 --- a/src/core/StackTrace.js +++ b/src/core/StackTrace.js @@ -36,7 +36,7 @@ getJasmineRequireObj().StackTrace = function(j$) { // e.g. "run@http://localhost:8888/__jasmine__/jasmine.js:4320:27" // or "http://localhost:8888/__jasmine__/jasmine.js:4320:27" { - re: /^(([^@\s]+)@)?([^\s]+)$/, + re: /^(?:(([^@\s]+)@)|@)?([^\s]+)$/, fnIx: 2, fileLineColIx: 3, style: 'webkit'