mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-10-25 09:23:33 +08:00
- Setup projects for e2e, integration, and unit tests in Jest configuration - Setup /tests/e2e/ tests for Jest+PlayWright - Setup /tests/integration/ tests for Jest - Setup /tests/unit/ tests for Jest - Setup eslint for Jest and Jest+Playwright environments - Move e2e configuration files into separate folder - Update e2e example tests - Update unit example tests - Update HTML fixtures
27 lines
696 B
JavaScript
27 lines
696 B
JavaScript
// Jest-Playwrigth Config
|
|
process.env.JEST_PLAYWRIGHT_CONFIG =
|
|
'./tests/e2e/config/jest-playwright.config.js';
|
|
|
|
module.exports = {
|
|
projects: [
|
|
// Unit Tests (Jest)
|
|
{
|
|
displayName: 'unit',
|
|
testMatch: ['<rootDir>/tests/unit/*.test.js'],
|
|
},
|
|
// Integration Tests (Jest)
|
|
{
|
|
displayName: 'integration',
|
|
testMatch: ['<rootDir>/tests/integration/*.test.js'],
|
|
},
|
|
// E2E Tests (Jest + Playwright)
|
|
{
|
|
displayName: 'e2e',
|
|
globalSetup: './tests/e2e/config/jest.setup.js',
|
|
globalTeardown: './tests/e2e/config/jest.teardown.js',
|
|
preset: 'jest-playwright-preset',
|
|
testMatch: ['<rootDir>/tests/e2e/*.test.js'],
|
|
},
|
|
],
|
|
};
|