remove useless windows testing files, fix testing?
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 14m1s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 14m1s
This commit is contained in:
@@ -1,26 +1,55 @@
|
||||
// vitest.config.e2e.ts
|
||||
import { defineConfig, mergeConfig } from 'vitest/config';
|
||||
import integrationConfig from './vitest.config.integration';
|
||||
import type { UserConfig } from 'vite';
|
||||
import viteConfig from './vite.config';
|
||||
|
||||
// Ensure NODE_ENV is set to 'test' for all Vitest runs.
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
// Define a type that includes the 'test' property from Vitest's config.
|
||||
type ViteConfigWithTest = UserConfig & { test?: UserConfig['test'] };
|
||||
|
||||
const { test: _unusedTest, ...baseViteConfig } = viteConfig as ViteConfigWithTest;
|
||||
|
||||
/**
|
||||
* E2E test configuration.
|
||||
* Uses a DIFFERENT port (3098) than integration tests (3099) to allow
|
||||
* both test suites to run sequentially without port conflicts.
|
||||
*/
|
||||
const e2eConfig = mergeConfig(
|
||||
integrationConfig,
|
||||
baseViteConfig,
|
||||
defineConfig({
|
||||
test: {
|
||||
name: 'e2e',
|
||||
environment: 'node',
|
||||
// Point specifically to E2E tests
|
||||
include: ['src/tests/e2e/**/*.e2e.test.ts'],
|
||||
exclude: [],
|
||||
// E2E tests use a different port to avoid conflicts with integration tests
|
||||
env: {
|
||||
NODE_ENV: 'test',
|
||||
BASE_URL: 'https://example.com',
|
||||
FRONTEND_URL: 'https://example.com',
|
||||
// Use port 3098 for E2E tests (integration uses 3099)
|
||||
TEST_PORT: '3098',
|
||||
VITE_API_BASE_URL: 'http://localhost:3098/api',
|
||||
},
|
||||
// E2E tests have their own dedicated global setup file
|
||||
globalSetup: './src/tests/setup/e2e-global-setup.ts',
|
||||
setupFiles: ['./src/tests/setup/global.ts'],
|
||||
// Increase timeout for E2E flows that involve AI or full API chains
|
||||
testTimeout: 120000,
|
||||
hookTimeout: 60000,
|
||||
fileParallelism: false,
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['html', 'json-summary', 'json'],
|
||||
reportsDirectory: '.coverage/e2e',
|
||||
reportOnFailure: true,
|
||||
clean: true,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
// Explicitly override the include array to ensure we don't inherit integration tests
|
||||
// (mergeConfig might concatenate arrays by default)
|
||||
if (e2eConfig.test) {
|
||||
e2eConfig.test.include = ['src/tests/e2e/**/*.e2e.test.ts'];
|
||||
}
|
||||
|
||||
export default e2eConfig;
|
||||
export default e2eConfig;
|
||||
|
||||
Reference in New Issue
Block a user