forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.cjs
36 lines (33 loc) · 1005 Bytes
/
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
35
36
/*!
* 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");
mappedPort = testTools.getTestPort(name);
process.env["PORT"] = mappedPort;
module.exports = {
preset: "jest-puppeteer",
globals: {
PATH: `http://localhost:${mappedPort}`,
},
testMatch: ["**/?(*.)+(spec|test).[t]s"],
testPathIgnorePatterns: ["/node_modules/", "dist"],
transform: {
"^.+\\.ts?$": "ts-jest",
},
reporters: [
"default",
[
"jest-junit",
{
outputDirectory: "nyc",
outputName: "jest-junit-report.xml",
},
],
],
// While we still have transitive dependencies on 'uuid<9.0.0', force the CJS entry point:
// See: https://stackoverflow.com/questions/73203367/jest-syntaxerror-unexpected-token-export-with-uuid-library
moduleNameMapper: { "^uuid$": "uuid" },
};