-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest-e2e.config.js
35 lines (33 loc) · 914 Bytes
/
jest-e2e.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Configuration for the e2e jest test execution.
const config = {
verbose: true,
// Puppeteer configuration.
preset: 'jest-puppeteer',
// Run just the e2e tests.
testMatch: ['<rootDir>/e2e/**/*.test.js'],
// Extend timeouts for E2E tests to account for CI variability.
testTimeout: 30 * 1000, // milliseconds
// Collect code coverage statistics by default.
collectCoverage: true,
coverageDirectory: 'coverage/e2e',
// Collect junit report information for test runs:
// https://www.npmjs.com/package/jest-junit
reporters: [
'default',
[
'jest-junit',
{ outputDirectory: 'reports/e2e', addFileAttribute: 'true' },
],
],
transform: {
// Configure so use esbuild, matching Hugo.
// https://www.npmjs.com/package/esbuild-jest
'^.+\\.[tj]sx?$': [
'esbuild-jest',
{
sourcemap: true,
},
],
},
};
module.exports = config;