-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjest.config.js
More file actions
29 lines (26 loc) · 877 Bytes
/
jest.config.js
File metadata and controls
29 lines (26 loc) · 877 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
export default {
// If you’re using ESM in Node, you’ll generally want this environment:
testEnvironment: "node",
// Opt in to using the test runner with ESM support (since Jest 28+):
transform: {
"^.+\\.[tj]sx?$": "babel-jest",
},
// If your source files are .js or .mjs, you usually don’t need a transform,
// *unless* you’re using Babel for additional features not yet in Node (e.g. JSX)
// In that case, you can add a Babel transform. For example:
// transform: {
// '^.+\\.[tj]sx?$': [
// 'babel-jest',
// { /* Babel config here if not using .babelrc */ }
// ]
// }
// If you’re using TypeScript in ESM mode, you might use ts-jest:
// transform: {
// '^.+\\.(ts|tsx)$': [
// 'ts-jest',
// {
// useESM: true
// }
// ]
// }
};