-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathjest.config.js
41 lines (38 loc) · 989 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @type {import('@jest/types').Config.ProjectConfig}
*/
module.exports = {
setupFiles: ['jest-date-mock'],
testEnvironment: 'node',
testPathIgnorePatterns: [
'/node_modules/',
'/apps/web/.next/',
'/apps/web/out/',
],
watchPathIgnorePatterns: [
'\\.gen\\.d\\.ts',
'\\.gen\\.ts',
'\\.gen\\.json',
'\\.schema\\.json',
],
testRegex: '\\.(spec|test)\\.[jt]sx?$',
transform: {
'^.+\\.(js|ts|tsx)$': [
'esbuild-jest',
{
sourcemap: true,
target: 'node14',
format: 'cjs',
},
],
},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
}
// NOTE maybe required for kits/file-picker
// import '@testing-library/jest-dom';
// If you are using @jest/globals with injectGlobals: false, you will need to use a different import in your tests setup file:
// // In your own jest-setup.js (or any other name)
// import '@testing-library/jest-dom/jest-globals'