-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35745e3
commit 1ac2990
Showing
7 changed files
with
15 additions
and
54 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
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
import { defineConfig } from 'vitest/config' | ||
import { createVitestConfig } from '@reduxjs/vitest-config' | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true | ||
} | ||
}) | ||
export default createVitestConfig() |
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 |
---|---|---|
@@ -1,23 +1,13 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
import { defineConfig } from 'vitest/config'; | ||
import { createVitestConfig } from '@reduxjs/vitest-config'; | ||
|
||
// No __dirname under Node ESM | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
|
||
export default defineConfig({ | ||
plugins: [tsconfigPaths({ projects: ['./tsconfig.json'] })], | ||
export default createVitestConfig({ | ||
test: { | ||
alias: process.env.TEST_DIST | ||
? { | ||
'@rtk-query/codegen-openapi': path.join(__dirname, '../..', 'node_modules/@rtk-query/codegen-openapi'), | ||
'@rtk-query/codegen-openapi': new URL('../../node_modules/@rtk-query/codegen-openapi', import.meta.url) | ||
.pathname, | ||
} | ||
: undefined, | ||
testTimeout: 10_000, | ||
pool: 'forks', | ||
globals: true, | ||
setupFiles: ['./test/vitest.setup.ts'], | ||
}, | ||
}); |
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
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