-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
executable file
·37 lines (34 loc) · 1002 Bytes
/
jest.config.js
File metadata and controls
executable file
·37 lines (34 loc) · 1002 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
30
31
32
33
34
35
36
37
const { jsWithTsESM: preset } = require('ts-jest/presets')
const { pathsToModuleNameMapper } = require('ts-jest/utils')
const { compilerOptions } = require('./tsconfig.json')
const vercel = require('./vercel.json')
/**
* @file Jest Configuration
* @see https://jestjs.io/docs/en/configuration
*/
const prefix = '<rootDir>/'
module.exports = {
...preset,
globals: {
'ts-jest': {
tsconfig: `${prefix}tsconfig.test.json`
}
},
moduleFileExtensions: ['js', 'json', 'ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix }),
prettierPath: `${prefix}node_modules/prettier`,
setupFilesAfterEnv: [`${prefix}__tests__/setup.ts`],
testEnvironment: 'node',
testPathIgnorePatterns: [
'__tests__/__fixtures__/',
'__tests__/__mocks__/',
'__tests__/setup.ts',
'__tests__/utils.ts',
'dist/',
'node_modules/',
'public/',
'(.*).d.ts'
],
testTimeout: vercel.functions['api/index.ts'].maxDuration * 1000,
verbose: true
}