-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for registering external integrations (#276)
- Loading branch information
Showing
21 changed files
with
2,999 additions
and
1,203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import sentryTestkit from 'sentry-testkit' | ||
import { setup, loadConfig, url } from '@nuxtjs/module-test-utils' | ||
import { $$, createBrowser } from './utils' | ||
|
||
const { testkit, localServer } = sentryTestkit() | ||
const TEST_DSN = 'http://[email protected]/000001' | ||
|
||
describe('Smoke test (default)', () => { | ||
/** @type {any} */ | ||
let nuxt | ||
/** @type {import('playwright-chromium').Browser} */ | ||
let browser | ||
|
||
beforeAll(async () => { | ||
({ nuxt } = await setup(loadConfig(__dirname, 'default'))) | ||
await localServer.start(TEST_DSN) | ||
const dsn = localServer.getDsn() | ||
nuxt = (await setup(loadConfig(__dirname, 'default', { sentry: { dsn } }, { merge: true }))).nuxt | ||
browser = await createBrowser() | ||
}) | ||
|
||
|
@@ -17,6 +23,11 @@ describe('Smoke test (default)', () => { | |
await browser.close() | ||
} | ||
await nuxt.close() | ||
await localServer.stop() | ||
}) | ||
|
||
beforeEach(() => { | ||
testkit.reset() | ||
}) | ||
|
||
test('builds and runs', async () => { | ||
|
@@ -32,4 +43,6 @@ describe('Smoke test (default)', () => { | |
expect(await $$('#client-side', page)).toBe('Works!') | ||
expect(errors).toEqual([]) | ||
}) | ||
|
||
// TODO: Add tests for custom integration. Blocked by various sentry-kit bugs reported in its repo. | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function (/** context */) { | ||
return [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,11 @@ const config = { | |
SentryModule | ||
], | ||
sentry: { | ||
dsn: 'https://[email protected]/1429779', | ||
clientIntegrations: { | ||
// Integration from @Sentry/browser package. | ||
TryCatch: { eventTarget: false } | ||
}, | ||
customClientIntegrations: '~/config/custom-client-integrations.js', | ||
publishRelease: { | ||
authToken: 'fakeToken', | ||
org: 'MyCompany', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function (/** context */) { | ||
return [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.