Skip to content

Commit 957452f

Browse files
author
Luca Forstner
committed
Fix some eslint errors in node tests
1 parent ba61707 commit 957452f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/node/test/sdk.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Integration } from '@sentry/types';
2+
23
import { init } from '../src/sdk';
34
import * as sdk from '../src/sdk';
45

@@ -9,7 +10,7 @@ const PUBLIC_DSN = 'https://username@domain/123';
910

1011
class MockIntegration implements Integration {
1112
public name: string;
12-
public setupOnce = jest.fn();
13+
public setupOnce: jest.Mock = jest.fn();
1314
public constructor(name: string) {
1415
this.name = name;
1516
}
@@ -23,7 +24,7 @@ describe('init()', () => {
2324
});
2425

2526
afterEach(() => {
26-
// @ts-ignore
27+
// @ts-ignore - Reset the default integrations of node sdk to original
2728
sdk.defaultIntegrations = defaultIntegrationsBackup;
2829
});
2930

@@ -33,7 +34,7 @@ describe('init()', () => {
3334
new MockIntegration('Mock integration 1.2'),
3435
];
3536

36-
//@ts-ignore
37+
// @ts-ignore - Replace default integrations with mock integrations, needs ts-ignore because imports are readonly
3738
sdk.defaultIntegrations = mockDefaultIntegrations;
3839

3940
init({ dsn: PUBLIC_DSN, defaultIntegrations: false });
@@ -48,7 +49,7 @@ describe('init()', () => {
4849
new MockIntegration('Some mock integration 2.2'),
4950
];
5051

51-
//@ts-ignore
52+
// @ts-ignore - Replace default integrations with mock integrations, needs ts-ignore because imports are readonly
5253
sdk.defaultIntegrations = mockDefaultIntegrations;
5354

5455
const mockIntegrations = [
@@ -70,7 +71,7 @@ describe('init()', () => {
7071
new MockIntegration('Some mock integration 3.2'),
7172
];
7273

73-
//@ts-ignore
74+
// @ts-ignore - Replace default integrations with mock integrations, needs ts-ignore because imports are readonly
7475
sdk.defaultIntegrations = mockDefaultIntegrations;
7576

7677
const newIntegration = new MockIntegration('Some mock integration 3.3');

0 commit comments

Comments
 (0)