Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/jest.config.js
5783 views
1
/** @type {import('ts-jest').JestConfigWithTsJest} */
2
module.exports = {
3
moduleDirectories: ["dist", "node_modules"],
4
preset: "ts-jest",
5
testEnvironment: "jsdom",
6
testEnvironmentOptions: {
7
// needed or jest imports the ts directly rather than the compiled
8
// dist exported from our package.json. Without this imports won't work.
9
// See https://jestjs.io/docs/configuration#testenvironment-string
10
customExportConditions: ["node", "node-addons"],
11
},
12
testMatch: ["**/?(*.)+(spec|test).ts?(x)"],
13
globals: {
14
"ts-jest": {
15
tsconfig: "tsconfig-dist.json",
16
},
17
},
18
setupFilesAfterEnv: ["./test/setup.js"],
19
};
20
21