1 Star 0 Fork 300

郭毅城/L7

forked from antv/L7 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.config.ts 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
import type { Config } from 'jest';
const sharedConfig: Partial<Config> = {
transform: {
// use typescript to convert from esm to cjs
'[.](m|c)?(ts|js)(x)?$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
isolatedModules: true,
},
],
'^.+.(glsl)$': 'jest-text-transformer',
// '\\.[jt]sx?$': 'esbuild-jest',
},
// any tests that operate on dist files shouldn't compile them again.
transformIgnorePatterns: ['<rootDir>/dist', '^.+\\.js$'],
modulePathIgnorePatterns: ['<rootDir>/dist'],
moduleNameMapper: {
'@antv/l7-(.+)$': '<rootDir>packages/$1/src',
'^.+.(css)$': 'jest-text-transformer',
},
};
const config: Config = {
testEnvironment: 'jsdom',
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: ['<rootDir>__tests__/unit/preset/environment.ts'],
testMatch: [
'<rootDir>/packages/*/__tests__/*.spec.+(ts|tsx|js)',
'<rootDir>/packages/*/__tests__/**/*/*.spec.+(ts|tsx|js)',
'<rootDir>/__tests__/unit/*.spec.+(ts|tsx|js)',
'<rootDir>/__tests__/unit/**/*/*.spec.+(ts|tsx|js)',
],
coveragePathIgnorePatterns: ['/node_modules/', '/iconfont/', '/__test__/'],
coverageDirectory: 'coverage',
coverageReporters: ['html', 'lcov', 'clover'],
coverageThreshold: {
global: {
branches: 30,
functions: 40,
lines: 50,
statements: 50,
},
},
...sharedConfig,
};
export default config;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/guoyicheng0/L7.git
git@gitee.com:guoyicheng0/L7.git
guoyicheng0
L7
L7
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385