unit test auto-provider refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 19m58s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 19m58s
This commit is contained in:
@@ -41,12 +41,14 @@ export default defineConfig({
|
||||
// By default, Vitest does not suppress console logs.
|
||||
// The onConsoleLog hook is only needed if you want to conditionally filter specific logs.
|
||||
// Keeping the default behavior is often safer to avoid missing important warnings.
|
||||
|
||||
environment: 'jsdom',
|
||||
// Explicitly point Vitest to the correct tsconfig and enable globals.
|
||||
globals: true, // tsconfig is auto-detected, so the explicit property is not needed and causes an error.
|
||||
globalSetup: './src/tests/setup/global-setup.ts',
|
||||
setupFiles: ['./src/tests/setup/tests-setup-unit.ts'],
|
||||
// The globalApiMock MUST come first to ensure it's applied before other mocks that might depend on it.
|
||||
setupFiles: [
|
||||
'./src/tests/setup/globalApiMock.ts',
|
||||
'./src/tests/setup/tests-setup-unit.ts',
|
||||
],
|
||||
// Explicitly include only test files.
|
||||
// We remove 'src/vite-env.d.ts' which was causing it to be run as a test.
|
||||
include: ['src/**/*.test.{ts,tsx}'],
|
||||
|
||||
Reference in New Issue
Block a user