-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix vitest not reloading JS files (#3395)
Seems like we also need a `vitest.config.ts` at the root of the workspace to override the `watchExclude` setting otherwise `dist` and `node_modules` are still excluded and everytime require a refresh of the vitest UI or restarting the watch. Only thing that was working is if you modified the test files or modified imported files directly from the test
- Loading branch information
1 parent
e56969c
commit 46d50af
Showing
4 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking | ||
changeKind: internal | ||
packages: | ||
- "@typespec/openapi3" | ||
--- | ||
|
||
Fix vitest not reloading JS files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ export default mergeConfig( | |
defineConfig({ | ||
test: { | ||
testTimeout: 10000, | ||
watchExclude: ["dist/**"], | ||
}, | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { defineConfig, mergeConfig } from "vitest/config"; | ||
import { defaultTypeSpecVitestConfig } from "./vitest.workspace.js"; | ||
|
||
export default mergeConfig(defaultTypeSpecVitestConfig, defineConfig({})); |