Skip to content

Commit ea99698

Browse files
committed
fix another set of linter errors
1 parent 88d4cff commit ea99698

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

packages/browser/test/unit/sdk.test.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ describe('init', () => {
6161

6262
init(options);
6363

64-
expect((DEFAULT_INTEGRATIONS[0].setupOnce as jest.Mock).mock.calls.length).toBe(1);
65-
expect((DEFAULT_INTEGRATIONS[1].setupOnce as jest.Mock).mock.calls.length).toBe(1);
64+
expect(DEFAULT_INTEGRATIONS[0].setupOnce as jest.Mock).toHaveBeenCalledTimes(1);
65+
expect(DEFAULT_INTEGRATIONS[1].setupOnce as jest.Mock).toHaveBeenCalledTimes(1);
6666
});
6767

6868
test("doesn't install default integrations if told not to", () => {
@@ -73,20 +73,17 @@ describe('init', () => {
7373
const options = getDefaultBrowserOptions({ dsn: PUBLIC_DSN, defaultIntegrations: false });
7474
init(options);
7575

76-
expect((DEFAULT_INTEGRATIONS[0].setupOnce as jest.Mock).mock.calls.length).toBe(0);
77-
expect((DEFAULT_INTEGRATIONS[1].setupOnce as jest.Mock).mock.calls.length).toBe(0);
76+
expect(DEFAULT_INTEGRATIONS[0].setupOnce as jest.Mock).toHaveBeenCalledTimes(0);
77+
expect(DEFAULT_INTEGRATIONS[1].setupOnce as jest.Mock).toHaveBeenCalledTimes(0);
7878
});
7979

8080
it('installs merged default integrations, with overrides provided through options', () => {
81-
const DEFAULT_INTEGRATIONS: Integration[] = [
81+
const DEFAULT_INTEGRATIONS = [
8282
new MockIntegration('MockIntegration 1.1'),
8383
new MockIntegration('MockIntegration 1.2'),
8484
];
8585

86-
const integrations: Integration[] = [
87-
new MockIntegration('MockIntegration 1.1'),
88-
new MockIntegration('MockIntegration 1.3'),
89-
];
86+
const integrations = [new MockIntegration('MockIntegration 1.1'), new MockIntegration('MockIntegration 1.3')];
9087
const options = getDefaultBrowserOptions({
9188
dsn: PUBLIC_DSN,
9289
defaultIntegrations: DEFAULT_INTEGRATIONS,
@@ -102,7 +99,7 @@ describe('init', () => {
10299
});
103100

104101
it('installs integrations returned from a callback function', () => {
105-
const DEFAULT_INTEGRATIONS: Integration[] = [
102+
const DEFAULT_INTEGRATIONS = [
106103
new MockIntegration('MockIntegration 2.1'),
107104
new MockIntegration('MockIntegration 2.2'),
108105
];

0 commit comments

Comments
 (0)