0 Star 0 Fork 125

rocky126/docsify

forked from docsifyjs/docsify 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.config.js 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
John Hildenbiddle 提交于 2020-11-11 16:57 . Remove BLANK_URL global
const { TEST_HOST } = require('./test/config/server.js');
const sharedConfig = {
errorOnDeprecated: true,
globals: {
TEST_HOST,
},
globalSetup: './test/config/jest.setup.js',
globalTeardown: './test/config/jest.teardown.js',
resetModules: true,
restoreMocks: true,
};
module.exports = {
// Adding globals to config root for easier importing into .eslint.js, but
// as of Jest 26.4.2 these globals need to be added to each project config
// as well.
globals: sharedConfig.globals,
projects: [
// Unit Tests (Jest)
{
...sharedConfig,
displayName: 'unit',
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testMatch: ['<rootDir>/test/unit/*.test.js'],
testURL: `${TEST_HOST}/_blank.html`,
},
// Integration Tests (Jest)
{
...sharedConfig,
displayName: 'integration',
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testMatch: ['<rootDir>/test/integration/*.test.js'],
testURL: `${TEST_HOST}/_blank.html`,
},
// E2E Tests (Jest + Playwright)
{
...sharedConfig,
displayName: 'e2e',
preset: 'jest-playwright-preset',
setupFilesAfterEnv: [
'<rootDir>/test/config/jest-playwright.setup-tests.js',
],
testEnvironmentOptions: {
'jest-playwright': {
// prettier-ignore
browsers: [
'chromium',
'firefox',
'webkit',
],
launchOptions: {
// headless: false,
// devtools: true,
},
},
},
testMatch: ['<rootDir>/test/e2e/*.test.js'],
},
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/rocky126/docsify.git
git@gitee.com:rocky126/docsify.git
rocky126
docsify
docsify
develop

搜索帮助