diff --git a/packages/browser/src/stack-parsers.ts b/packages/browser/src/stack-parsers.ts index 5ee652001854..5d58e9865cd4 100644 --- a/packages/browser/src/stack-parsers.ts +++ b/packages/browser/src/stack-parsers.ts @@ -130,13 +130,7 @@ const opera11: StackLineParserFn = line => { export const opera11StackParser: StackLineParser = [OPERA11_PRIORITY, opera11]; -export const defaultStackParsers = [ - chromeStackParser, - geckoStackParser, - opera10StackParser, - opera11StackParser, - winjsStackParser, -]; +export const defaultStackParsers = [chromeStackParser, geckoStackParser, winjsStackParser]; /** * Safari web extensions, starting version unknown, can produce "frames-only" stacktraces. diff --git a/packages/browser/test/unit/tracekit/opera.test.ts b/packages/browser/test/unit/tracekit/opera.test.ts index a97675824e18..9084447d4e29 100644 --- a/packages/browser/test/unit/tracekit/opera.test.ts +++ b/packages/browser/test/unit/tracekit/opera.test.ts @@ -1,9 +1,10 @@ import { createStackParser } from '@sentry/utils'; import { exceptionFromError } from '../../../src/eventbuilder'; -import { defaultStackParsers } from '../../../src/stack-parsers'; +import { defaultStackParsers, opera10StackParser, opera11StackParser } from '../../../src/stack-parsers'; -const parser = createStackParser(...defaultStackParsers); +const operaParser = createStackParser(opera10StackParser, opera11StackParser); +const chromiumParser = createStackParser(...defaultStackParsers); describe('Tracekit - Opera Tests', () => { it('should parse Opera 10 error', () => { @@ -29,7 +30,7 @@ describe('Tracekit - Opera Tests', () => { '', }; - const ex = exceptionFromError(parser, OPERA_10); + const ex = exceptionFromError(operaParser, OPERA_10); expect(ex).toEqual({ value: 'Statement on line 42: Type mismatch (usually non-object value supplied where object required)', @@ -75,7 +76,7 @@ describe('Tracekit - Opera Tests', () => { ' foo();', }; - const ex = exceptionFromError(parser, OPERA_11); + const ex = exceptionFromError(operaParser, OPERA_11); expect(ex).toEqual({ value: "'this.undef' is not a function", @@ -112,7 +113,7 @@ describe('Tracekit - Opera Tests', () => { ' dumpException3();', }; - const ex = exceptionFromError(parser, OPERA_12); + const ex = exceptionFromError(operaParser, OPERA_12); expect(ex).toEqual({ value: "Cannot convert 'x' to object", @@ -156,7 +157,7 @@ describe('Tracekit - Opera Tests', () => { ' at bar (http://path/to/file.js:108:168)', }; - const ex = exceptionFromError(parser, OPERA_25); + const ex = exceptionFromError(chromiumParser, OPERA_25); expect(ex).toEqual({ value: "Cannot read property 'undef' of null",