-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-runner-jest.config.cjs
More file actions
44 lines (39 loc) · 1004 Bytes
/
test-runner-jest.config.cjs
File metadata and controls
44 lines (39 loc) · 1004 Bytes
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
36
37
38
39
40
41
42
43
44
const { getJestConfig } = require('@storybook/test-runner')
/**
* @type {import('@jest/types').Config.InitialOptions}
*/
module.exports = {
// The default configuration comes from @storybook/test-runner
...getJestConfig(),
// Configure test results directory for CI
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'test-results',
outputName: 'storybook-junit.xml',
usePathForSuiteName: true,
},
],
],
// Set timeout for CI environments
testTimeout: 60000,
// Ensure test results are always written
forceExit: true,
// Configure Playwright-specific options
testEnvironmentOptions: {
'jest-playwright': {
browsers: ['chromium'],
exitOnPageError: false,
launchOptions: {
headless: true,
args: ['--no-sandbox', '--disable-dev-shm-usage'],
},
contextOptions: {
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true,
},
},
},
}