-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
jest.config.cjs
34 lines (32 loc) · 1.01 KB
/
jest.config.cjs
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
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const jestConfig = require("../../shared-configs/jest-config/jest.config.cjs");
module.exports = {
...jestConfig,
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
// The configuration below is for mocking import.meta.url in DPAPI as jest only has experimental support for ESM
diagnostics: {
ignoreCodes: [1343],
},
astTransformers: {
before: [
{
path: "ts-jest-mock-import-meta",
options: {
metaObjectReplacement: {
url: "http://localhost:3000",
},
},
},
],
},
},
],
},
testEnvironment: "node",
};