1 Star 0 Fork 125

hzhlu/docsify

forked from docsifyjs/docsify 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.config.js 1001 Bytes
一键复制 编辑 原始数据 按行查看 历史
John Hildenbiddle 提交于 2024-07-19 11:34 . feat: v5 style overhaul (#2469)
import { testConfig } from './server.configs.js';
const { hostname, port } = testConfig;
const TEST_HOST = `http://${hostname}:${port}`;
const sharedConfig = {
errorOnDeprecated: true,
globalSetup: './test/config/jest.setup.js',
globalTeardown: './test/config/jest.teardown.js',
prettierPath: null, // Fix for Jest v29 and Prettier v3 (https://github.com/jestjs/jest/issues/14305)
resetModules: true,
restoreMocks: true,
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testEnvironment: 'jest-environment-jsdom',
testEnvironmentOptions: {
url: `${TEST_HOST}/_blank.html`,
},
};
process.env.TEST_HOST = TEST_HOST;
export default {
transform: {},
projects: [
// Unit Tests
{
displayName: 'unit',
...sharedConfig,
testMatch: ['<rootDir>/test/unit/*.test.js'],
},
// Integration Tests
{
displayName: 'integration',
...sharedConfig,
testMatch: ['<rootDir>/test/integration/*.test.js'],
},
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/hzhlu/docsify.git
[email protected]:hzhlu/docsify.git
hzhlu
docsify
docsify
develop

搜索帮助