File size: 979 Bytes
ab2ded1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { Config, configUmiAlias, createConfig } from 'umi/test';

export default async () => {
  return (await configUmiAlias({
    ...createConfig({
      target: 'browser',
      jsTransformer: 'esbuild',
      // config opts for esbuild , it will pass to esbuild directly
      jsTransformerOpts: { jsx: 'automatic' },
    }),
    setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
    collectCoverageFrom: [
      '**/*.{ts,tsx,js,jsx}',
      '!.umi/**',
      '!.umi-test/**',
      '!.umi-production/**',
      '!.umirc.{js,ts}',
      '!.umirc.*.{js,ts}',
      '!jest.config.{js,ts}',
      '!coverage/**',
      '!dist/**',
      '!config/**',
      '!mock/**',
    ],
    // if you require some es-module npm package, please uncomment below line and insert your package name
    // transformIgnorePatterns: ['node_modules/(?!.*(lodash-es|your-es-pkg-name)/)']
    coverageThreshold: {
      global: {
        lines: 1,
      },
    },
  })) as Config.InitialOptions;
};