mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
- English-first UI, role config, legal and marketing copy - Regenerated public generator assets; plugin regression test harness - Shared SM2 helpers colocated with web client
74 lines
1.4 KiB
JavaScript
74 lines
1.4 KiB
JavaScript
module.exports = {
|
|
// Test environment
|
|
testEnvironment: 'jsdom',
|
|
|
|
// Setup files
|
|
setupFilesAfterEnv: ['<rootDir>/src/tests/setup.js'],
|
|
|
|
// Module name mapping
|
|
moduleNameMapping: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
'^@/plugins_func/functions/(.*)$': '<rootDir>/src/plugins_func/functions/$1'
|
|
},
|
|
|
|
// Test file patterns
|
|
testMatch: [
|
|
'<rootDir>/src/tests/**/*.test.js',
|
|
'<rootDir>/src/**/__tests__/**/*.js',
|
|
'<rootDir>/src/**/*.test.js'
|
|
],
|
|
|
|
// Coverage configuration
|
|
collectCoverage: true,
|
|
collectCoverageFrom: [
|
|
'src/**/*.{js,vue}',
|
|
'!src/main.js',
|
|
'!src/router/index.js',
|
|
'!src/store/index.js',
|
|
'!src/tests/**',
|
|
'!**/node_modules/**'
|
|
],
|
|
|
|
coverageReporters: ['text', 'lcov', 'html'],
|
|
coverageDirectory: '<rootDir>/coverage',
|
|
|
|
// Coverage thresholds
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 70,
|
|
functions: 70,
|
|
lines: 70,
|
|
statements: 70
|
|
}
|
|
},
|
|
|
|
// Transform configuration
|
|
transform: {
|
|
'^.+\\.vue$': 'vue-jest',
|
|
'^.+\\.js$': 'babel-jest'
|
|
},
|
|
|
|
// Module file extensions
|
|
moduleFileExtensions: [
|
|
'js',
|
|
'json',
|
|
'vue'
|
|
],
|
|
|
|
// Transform ignore patterns
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!(element-ui|vue-i18n)/)'
|
|
],
|
|
|
|
// Test timeout
|
|
testTimeout: 10000,
|
|
|
|
// Verbose output
|
|
verbose: true,
|
|
|
|
// Clear mocks between tests
|
|
clearMocks: true,
|
|
|
|
// Restore mocks after each test
|
|
restoreMocks: true
|
|
};
|