forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
36 lines (30 loc) · 1.11 KB
/
Copy pathjest.config.js
File metadata and controls
36 lines (30 loc) · 1.11 KB
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
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
// jest.config.js
module.exports = {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/test/tsconfig.test.json'
}
},
preset: "ts-jest",
// The glob patterns Jest uses to detect test files
testMatch: ["/**/test/*.spec.tsx"],
testEnvironment: "jsdom",
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/', 'dist'],
// A map from regular expressions to paths to transformers
transform: {
"^.+\\.(t|j)sx?$": "ts-jest",
'^.+\\.(jpg|jpeg|png|gif|svg|mp4)$': 'jest-transform-file'
},
// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy',
// '\\.svg$': '<rootDir>/__mocks__/svgrMock.js'
},
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ['<rootDir>/test/setup.ts']
};