Skip to content

Commit d243198

Browse files
committed
fix node unit test type errors
1 parent 296f4c2 commit d243198

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/node/test/integrations/http.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('tracing', () => {
4040
nock('http://dogs.are.great').get('/').reply(200);
4141

4242
const transaction = createTransactionOnScope();
43-
const spans = (transaction as Span).spanRecorder?.spans as Span[];
43+
const spans = (transaction as unknown as Span).spanRecorder?.spans as Span[];
4444

4545
http.get('http://dogs.are.great/');
4646

@@ -55,7 +55,7 @@ describe('tracing', () => {
5555
nock('http://squirrelchasers.ingest.sentry.io').get('/api/12312012/store/').reply(200);
5656

5757
const transaction = createTransactionOnScope();
58-
const spans = (transaction as Span).spanRecorder?.spans as Span[];
58+
const spans = (transaction as unknown as Span).spanRecorder?.spans as Span[];
5959

6060
http.get('http://squirrelchasers.ingest.sentry.io/api/12312012/store/');
6161

packages/tracing/test/span.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { BrowserClient } from '@sentry/browser';
22
import { Hub, makeMain, Scope } from '@sentry/hub';
3+
import { BaseTransportOptions, ClientOptions } from '@sentry/types';
34
import { createBaggage, getSentryBaggageItems, getThirdPartyBaggage, isSentryBaggageEmpty } from '@sentry/utils';
45

56
import { Span, Transaction } from '../src';
67
import { TRACEPARENT_REGEXP } from '../src/utils';
78
import { getDefaultBrowserClientOptions } from './testutils';
8-
import { BaseTransportOptions, ClientOptions } from '@sentry/types';
99

1010
describe('Span', () => {
1111
let hub: Hub;
@@ -395,7 +395,7 @@ describe('Span', () => {
395395

396396
describe('getBaggage and _getBaggageWithSentryValues', () => {
397397
beforeEach(() => {
398-
hub.getClient()!!.getOptions = () => {
398+
hub.getClient()!.getOptions = () => {
399399
return {
400400
release: '1.0.1',
401401
environment: 'production',
@@ -412,7 +412,7 @@ describe('Span', () => {
412412
hub,
413413
);
414414

415-
const hubSpy = jest.spyOn(hub.getClient()!!, 'getOptions');
415+
const hubSpy = jest.spyOn(hub.getClient()!, 'getOptions');
416416

417417
const span = transaction.startChild();
418418

@@ -433,7 +433,7 @@ describe('Span', () => {
433433
hub,
434434
);
435435

436-
const hubSpy = jest.spyOn(hub.getClient()!!, 'getOptions');
436+
const hubSpy = jest.spyOn(hub.getClient()!, 'getOptions');
437437

438438
const span = transaction.startChild();
439439

0 commit comments

Comments
 (0)