Skip to content

Commit 0666eb5

Browse files
authored
test(nestjs): Switch to explicit vitest imports (#13214)
As per https://vitest.dev/config/#globals > By default, vitest does not provide global APIs for explicitness I think we should follow vitest defaults here and explicitly import in the APIs that we need. This refactors our Nestjs SDK tests to do so. ref #11084
1 parent a099980 commit 0666eb5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/nestjs/test/sdk.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { beforeEach, describe, expect, it, vi } from 'vitest';
2+
13
import * as SentryNode from '@sentry/node';
24
import { SDK_VERSION } from '@sentry/utils';
35

4-
import { vi } from 'vitest';
56
import { init as nestInit } from '../src/sdk';
67

78
const nodeInit = vi.spyOn(SentryNode, 'init');

packages/nestjs/tsconfig.test.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"include": ["test/**/*", "vite.config.ts"],
55

66
"compilerOptions": {
7-
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8-
"types": ["vitest/globals"]
9-
107
// other package-specific, test-specific options
118
}
129
}

0 commit comments

Comments
 (0)