-
Notifications
You must be signed in to change notification settings - Fork 567
Expand file tree
/
Copy pathjest.config.cjs
More file actions
37 lines (34 loc) · 958 Bytes
/
jest.config.cjs
File metadata and controls
37 lines (34 loc) · 958 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
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
// Get the test port from the global map and set it in env for this test
const testTools = require("@fluidframework/test-tools");
const { name } = require("./package.json");
const mappedPort = testTools.getTestPort(name);
process.env["PORT"] = mappedPort;
module.exports = {
preset: "jest-puppeteer",
roots: ["<rootDir>/src"],
globals: {
PATH: `http://localhost:${mappedPort}`,
},
transform: {
"^.+\\.ts?$": "ts-jest",
},
reporters: [
"default",
[
"jest-junit",
{
outputDirectory: "nyc",
outputName: "jest-junit-report.xml",
},
],
],
testTimeout: 30_000,
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.ts?$",
testPathIgnorePatterns: ["/node_modules/", "dist"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
coveragePathIgnorePatterns: ["/node_modules/", "/src/test/"],
};