Fixed stack trace filtering on Safari 15
This commit is contained in:
@@ -52,7 +52,7 @@ Jasmine tests itself across many browsers (Safari, Chrome, Firefox, Microsoft Ed
|
||||
| Environment | Supported versions |
|
||||
|-------------------|--------------------|
|
||||
| Node | 10, 12, 14, 16 |
|
||||
| Safari | 8-14 |
|
||||
| Safari | 8-15 |
|
||||
| Chrome | Evergreen |
|
||||
| Firefox | Evergreen, 68, 78, 91 |
|
||||
| Edge | Evergreen |
|
||||
@@ -62,6 +62,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).
|
||||
|
||||
@@ -9460,7 +9460,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'
|
||||
|
||||
@@ -30,6 +30,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 safari 9
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user