Files
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 12:16:49 +08:00

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;