f36e2104d8
sep-tests / ragflow_preflight (push) Waiting to run
sep-tests / ragflow_tests_infinity (push) Blocked by required conditions
sep-tests / ragflow_tests_elasticsearch (push) Blocked by required conditions
tests / ragflow_preflight (push) Waiting to run
tests / ragflow_tests_infinity (push) Blocked by required conditions
tests / ragflow_tests_elasticsearch (push) Blocked by required conditions
43 lines
950 B
TypeScript
43 lines
950 B
TypeScript
import type { Config } from 'jest';
|
|
|
|
const config: Config = {
|
|
testEnvironment: 'jsdom',
|
|
transform: {
|
|
'^.+\\.(ts|tsx|js|jsx)$': [
|
|
'esbuild-jest',
|
|
{
|
|
sourcemap: true,
|
|
loaders: {
|
|
'.ts': 'tsx',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
'^human-id$': '<rootDir>/__mocks__/human-id.js',
|
|
'\\.(css|less|scss|sass)$': '<rootDir>/__mocks__/styleMock.js',
|
|
'\\.(jpg|jpeg|png|gif|svg|webp)$': '<rootDir>/__mocks__/fileMock.js',
|
|
},
|
|
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
|
|
collectCoverageFrom: [
|
|
'src/**/*.{ts,tsx,js,jsx}',
|
|
'!src/.umi/**',
|
|
'!src/.umi-test/**',
|
|
'!src/.umi-production/**',
|
|
'!**/*.d.ts',
|
|
'!coverage/**',
|
|
'!dist/**',
|
|
'!config/**',
|
|
'!mock/**',
|
|
],
|
|
coverageThreshold: {
|
|
global: {
|
|
lines: 1,
|
|
},
|
|
},
|
|
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
|
|
};
|
|
|
|
export default config;
|