1 Star 0 Fork 16

中华田园人/cocos-engine

forked from Cocos/cocos-engine 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.config.js 990 Bytes
一键复制 编辑 原始数据 按行查看 历史
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const ts = require('typescript');
const ps = require('path');
const tsConfig = ts.readConfigFile(ps.join(__dirname, 'tsconfig.json'), ts.sys.readFile);
if (!tsConfig.config) {
throw new Error(`Failed to read tsconfig`);
}
const { compilerOptions } = tsConfig.config;
module.exports = {
testEnvironment: 'jsdom',
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: `${__dirname}/` }),
transformIgnorePatterns: [
// ignore everything in the node_modules EXCEPT for:
// - @cocos/dragonbones-js
'node_modules/(?!(@cocos/dragonbones-js)/)',
],
setupFilesAfterEnv: [
"./tests/setup-after-env.ts",
],
setupFiles: [
'./tests/init.ts',
],
coverageDirectory: './test/report/',
globals: {
CC_DEV: true,
CC_TEST: true,
CC_PHYSICS_BUILTIN: true,
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Chinese_pastoral_person/cocos-engine.git
git@gitee.com:Chinese_pastoral_person/cocos-engine.git
Chinese_pastoral_person
cocos-engine
cocos-engine
develop

搜索帮助