Skip to content

Commit de32106

Browse files
committed
Import vitest when needed instead of adding global types in tsconfig
1 parent 9322bc7 commit de32106

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/Notify/assets/test/controller.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { Application, Controller } from '@hotwired/stimulus';
1313
import { getByTestId, waitFor } from '@testing-library/dom';
1414
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1515
import NotifyController from '../src/controller';
16+
import { vi } from 'vitest';
1617

1718
// Controller used to check the actual controller was properly booted
1819
class CheckController extends Controller {

src/Turbo/assets/test/turbo_stream_controller.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { Application } from '@hotwired/stimulus';
1313
import { getByTestId } from '@testing-library/dom';
1414
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1515
import TurboStreamController from '../src/turbo_stream_controller';
16+
import { vi } from 'vitest';
1617

1718
const startStimulus = () => {
1819
const application = Application.start();

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
"jsx": "react"
1919
},
2020
"exclude": ["src/*/assets/dist"],
21-
"include": ["src/*/assets/src", "src/*/assets/test"],
22-
"types": ["vite/client", "vitest/globals"]
21+
"include": ["src/*/assets/src", "src/*/assets/test"]
2322
}

0 commit comments

Comments
 (0)