diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/init.js b/packages/browser-integration-tests/suites/integrations/ContextLines/init.js new file mode 100644 index 000000000000..4461826e0214 --- /dev/null +++ b/packages/browser-integration-tests/suites/integrations/ContextLines/init.js @@ -0,0 +1,9 @@ +import * as Sentry from '@sentry/browser'; +import { ContextLines } from '@sentry/integrations'; + +window.Sentry = Sentry; + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + integrations: [new ContextLines()], +}); diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html b/packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html new file mode 100644 index 000000000000..acb69e682644 --- /dev/null +++ b/packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html @@ -0,0 +1,12 @@ + + + + + + + + + ', + '', + ], + }, + ], + }, + }); + }, +); diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js b/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js new file mode 100644 index 000000000000..744649fb291c --- /dev/null +++ b/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js @@ -0,0 +1,3 @@ +document.getElementById('script-error-btn').addEventListener('click', () => { + throw new Error('Error without context lines'); +}); diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html b/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html new file mode 100644 index 000000000000..80569790143a --- /dev/null +++ b/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html @@ -0,0 +1,12 @@ + + + + + + + + +