28 Star 412 Fork 112

GVPdocsifyjs / docsify

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jest.config.js 880 Bytes
一键复制 编辑 原始数据 按行查看 历史
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',
resetModules: true,
restoreMocks: true,
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testEnvironment: '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'],
},
],
};
JavaScript
1
https://gitee.com/docsifyjs/docsify.git
git@gitee.com:docsifyjs/docsify.git
docsifyjs
docsify
docsify
develop

搜索帮助