From d109d4bf68facbec859636d73f927185ef1a19dc Mon Sep 17 00:00:00 2001 From: JonasBa Date: Mon, 20 Dec 2021 18:19:11 +0100 Subject: [PATCH] fix import --- packages/core/test/lib/base.test.ts | 4 ++-- packages/types/src/client.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/test/lib/base.test.ts b/packages/core/test/lib/base.test.ts index cd8d7f992fb4..27b57923168b 100644 --- a/packages/core/test/lib/base.test.ts +++ b/packages/core/test/lib/base.test.ts @@ -1,6 +1,6 @@ import { Hub, Scope, Session } from '@sentry/hub'; import { Event, Span, Transport } from '@sentry/types'; -import { logger, SentryError, SyncPromise } from '@sentry/utils'; +import { logger, SentryError, SyncPromise, dsnToString } from '@sentry/utils'; import * as integrationModule from '../../src/integration'; import { TestBackend } from '../mocks/backend'; @@ -67,7 +67,7 @@ describe('BaseClient', () => { test('returns the Dsn', () => { expect.assertions(1); const client = new TestClient({ dsn: PUBLIC_DSN }); - expect(client.getDsn()!.toString()).toBe(PUBLIC_DSN); + expect(dsnToString(client.getDsn())).toBe(PUBLIC_DSN); }); test('allows missing Dsn', () => { diff --git a/packages/types/src/client.ts b/packages/types/src/client.ts index 109df960e0cf..9c4510b91806 100644 --- a/packages/types/src/client.ts +++ b/packages/types/src/client.ts @@ -1,4 +1,4 @@ -import { DsnLike } from './dsn'; +import { DsnComponents } from './dsn'; import { Event, EventHint } from './event'; import { Integration, IntegrationClass } from './integration'; import { Options } from './options'; @@ -55,7 +55,7 @@ export interface Client { captureSession?(session: Session): void; /** Returns the current Dsn. */ - getDsn(): DsnLike | undefined; + getDsn(): DsnComponents | undefined; /** Returns the current options. */ getOptions(): O;