-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (24 loc) · 817 Bytes
/
jest.config.js
File metadata and controls
28 lines (24 loc) · 817 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
const { configure } = require('mobx')
const nextJest = require('next/jest')
configure({
/**
* By default, our stores use `makeAutoObservable` from the `mobx` library. This
* turns the store instance into a readonly class, which prevents us from being
* able to use stubs and spies under test.
*
* Setting this to false, allows us to use stubs and spies under test.
*
* @see https://mobx.js.org/configuration.html#safedescriptors-boolean
*/
safeDescriptors: false,
});
const createJestConfig = nextJest({
dir: './',
})
const customJestConfig = {
roots: ["<rootDir>/src/"],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['<rootDir>/src/environments/'],
testEnvironment: 'jest-environment-jsdom',
}
module.exports = createJestConfig(customJestConfig)