2025-04-30 16:33:43 -07:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/// <reference types="vitest" />
|
|
|
|
|
import { defineConfig } from 'vitest/config';
|
2025-10-25 14:41:53 -07:00
|
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
|
import * as path from 'node:path';
|
|
|
|
|
|
2026-04-14 23:35:02 -07:00
|
|
|
const dirname = fileURLToPath(new URL('.', import.meta.url));
|
2025-04-30 16:33:43 -07:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
2025-10-30 11:50:26 -07:00
|
|
|
resolve: {
|
2026-04-14 23:35:02 -07:00
|
|
|
alias: {
|
2026-04-18 01:54:39 +00:00
|
|
|
'@google/gemini-cli-core/src': path.resolve(dirname, '../core/src'),
|
2026-04-15 11:05:06 -07:00
|
|
|
'@google/gemini-cli-core': path.resolve(dirname, '../core/dist/index.js'),
|
2026-04-14 23:35:02 -07:00
|
|
|
'@google/gemini-cli-test-utils': path.resolve(
|
|
|
|
|
dirname,
|
|
|
|
|
'../test-utils/src/index.js',
|
|
|
|
|
),
|
|
|
|
|
},
|
2025-10-30 11:50:26 -07:00
|
|
|
},
|
2025-04-30 16:33:43 -07:00
|
|
|
test: {
|
2025-05-27 12:45:28 -07:00
|
|
|
globals: true,
|
|
|
|
|
reporters: ['default', 'junit'],
|
2026-04-14 23:35:02 -07:00
|
|
|
environment: 'node',
|
2025-07-31 16:16:29 -07:00
|
|
|
setupFiles: ['./test-setup.ts'],
|
2026-02-10 10:46:42 -08:00
|
|
|
testTimeout: 60000,
|
|
|
|
|
hookTimeout: 60000,
|
2026-04-15 13:09:15 -07:00
|
|
|
pool: 'threads', // Switch to threads for performance and consistency with root config
|
2026-04-14 21:32:18 -07:00
|
|
|
silent: true,
|
2026-04-14 19:25:56 -07:00
|
|
|
exclude: [
|
|
|
|
|
'**/node_modules/**',
|
|
|
|
|
'**/dist/**',
|
2026-04-14 19:38:50 -07:00
|
|
|
'**/cypress/**',
|
2026-04-14 19:25:56 -07:00
|
|
|
'**/src/ui/components/messages/ToolStickyHeaderRegression.test.tsx',
|
|
|
|
|
'**/src/ui/components/views/McpStatus.test.tsx',
|
|
|
|
|
'**/src/ui/components/messages/SubagentHistoryMessage.test.tsx',
|
|
|
|
|
'**/src/ui/components/BackgroundTaskDisplay.test.tsx',
|
|
|
|
|
'**/src/ui/auth/useAuth.test.tsx',
|
|
|
|
|
],
|
2025-05-27 12:45:28 -07:00
|
|
|
coverage: {
|
2026-04-14 23:35:02 -07:00
|
|
|
enabled: false,
|
2025-05-27 12:45:28 -07:00
|
|
|
provider: 'v8',
|
|
|
|
|
reportsDirectory: './coverage',
|
2025-06-12 17:17:29 -07:00
|
|
|
include: ['src/**/*'],
|
2025-05-27 12:45:28 -07:00
|
|
|
reporter: [
|
|
|
|
|
['text', { file: 'full-text-summary.txt' }],
|
|
|
|
|
'html',
|
|
|
|
|
'json',
|
|
|
|
|
'lcov',
|
|
|
|
|
'cobertura',
|
|
|
|
|
['json-summary', { outputFile: 'coverage-summary.json' }],
|
|
|
|
|
],
|
|
|
|
|
},
|
2025-04-30 16:33:43 -07:00
|
|
|
},
|
|
|
|
|
});
|