Skip to content

Commit 6394128

Browse files
Copilotsheremet-va
andcommitted
Add test for https protocol in Firefox/Safari stack trace parsing
Co-authored-by: sheremet-va <[email protected]>
1 parent fa0515f commit 6394128

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎test/core/test/utils.spec.ts‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ describe('isNegativeNaN', () => {
308308
})
309309
})
310310

311-
test('should still parse valid Firefox/Safari stack traces correctly', () => {
312-
// Ensure we didn't break valid stack trace parsing
311+
describe('parseSingleFFOrSafariStack', () => {
312+
test('should parse valid Firefox/Safari stack traces with file protocol', () => {
313313
const validStackLine = 'functionName@file:///path/to/file.js:123:45'
314314

315315
const result = parseSingleFFOrSafariStack(validStackLine)
@@ -322,6 +322,19 @@ describe('isNegativeNaN', () => {
322322
})
323323
})
324324

325+
test('should parse valid Firefox/Safari stack traces with https protocol', () => {
326+
const validStackLine = 'functionName@https://example.com/path/to/file.js:123:45'
327+
328+
const result = parseSingleFFOrSafariStack(validStackLine)
329+
330+
expect(result).toEqual({
331+
file: '/path/to/file.js',
332+
method: 'functionName',
333+
line: 123,
334+
column: 45,
335+
})
336+
})
337+
325338
test('should handle stack lines without function names', () => {
326339
const stackLineWithoutFunction = '@file:///path/to/file.js:123:45'
327340

0 commit comments

Comments
 (0)