Uh oh!
There was an error while loading. Please reload this page.
forked from docsifyjs/docsify
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
Latest commit
37 lines (34 loc) Β· 1001 Bytes
/
Copy pathjest.config.js
File metadata and controls
37 lines (34 loc) Β· 1001 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
import{testConfig}from'./server.configs.js';
const{ hostname, port }=testConfig;
constTEST_HOST=`http://${hostname}:${port}`;
constsharedConfig={
errorOnDeprecated: true,
globalSetup: './test/config/jest.setup.js',
globalTeardown: './test/config/jest.teardown.js',
prettierPath: null,// Fix for Jest v29 and Prettier v3 (https://github.com/jestjs/jest/issues/14305)
resetModules: true,
restoreMocks: true,
setupFilesAfterEnv: ['<rootDir>/test/config/jest.setup-tests.js'],
testEnvironment: 'jest-environment-jsdom',
testEnvironmentOptions: {
url: `${TEST_HOST}/_blank.html`,
},
};
process.env.TEST_HOST=TEST_HOST;
exportdefault{
transform: {},
projects: [
// Unit Tests
{
displayName: 'unit',
...sharedConfig,
testMatch: ['<rootDir>/test/unit/*.test.js'],
},
// Integration Tests
{
displayName: 'integration',
...sharedConfig,
testMatch: ['<rootDir>/test/integration/*.test.js'],
},
],
};