forked from alleotech/grid3_client_ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
24 lines (22 loc) · 825 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/** @type {import("ts-jest/dist/types").InitialOptionsTsJest} */
const { defaults } = require("jest-config");
module.exports = {
verbose: true,
preset: "ts-jest",
testEnvironment: "node",
globals: {
"ts-jest": {
tsconfig: "tsconfig-node.json",
},
},
extraGlobals: ["Math"],
moduleFileExtensions: [...defaults.moduleFileExtensions, "ts", "tsx"],
modulePathIgnorePatterns: ["<rootDir>/dist"],
testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": require.resolve("ts-jest"),
},
transformIgnorePatterns: ["/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)"],
// Don't use it with ts files -> Not supported
// globalTeardown: "<rootDir>/tests/global_teardown.ts"
};