qwen-code/packages/cli/vitest.config.ts
tanzhenxin 07b186fcbf build: Improve build efficiency and add dev mode
- Remove duplicate webui build in vscode-ide-companion (fixes double build)
- Fix misleading [watch] log messages in esbuild.js (only show in watch mode)
- Update vite-plugin-dts to ^4.5.4 for TypeScript 5.8+ support
- Update baseline-browser-mapping to ^2.9.19 to silence outdated data warnings
- Fix vitest config to use @qwen-code/qwen-code-core instead of old gemini-cli-core
- Add resolve.alias in cli vitest.config.ts for source-based testing
- Add npm run dev script for running from TypeScript source without build

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-31 22:41:54 +08:00

57 lines
1.2 KiB
TypeScript

/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config';
import path from 'node:path';
export default defineConfig({
resolve: {
alias: {
'@qwen-code/qwen-code-core': path.resolve(
__dirname,
'../core/src/index.ts',
),
},
},
test: {
include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)', 'config.test.ts'],
exclude: ['**/node_modules/**', '**/dist/**', '**/cypress/**'],
environment: 'jsdom',
globals: true,
reporters: ['default', 'junit'],
silent: true,
outputFile: {
junit: 'junit.xml',
},
setupFiles: ['./test-setup.ts'],
coverage: {
enabled: true,
provider: 'v8',
reportsDirectory: './coverage',
include: ['src/**/*'],
reporter: [
['text', { file: 'full-text-summary.txt' }],
'html',
'json',
'lcov',
'cobertura',
['json-summary', { outputFile: 'coverage-summary.json' }],
],
},
poolOptions: {
threads: {
minThreads: 8,
maxThreads: 16,
},
},
server: {
deps: {
inline: [/@qwen-code\/qwen-code-core/],
},
},
},
});