Merge remote-tracking branch 'upstream/safari-15' into 4.0

This commit is contained in:
Steve Gravrock
2021-12-07 17:03:40 -08:00
5 changed files with 35 additions and 4 deletions

View File

@@ -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).

View File

@@ -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'

View File

@@ -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

View File

@@ -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',

View File

@@ -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'