forked from peanutprotocol/peanut-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.cjs
30 lines (29 loc) · 949 Bytes
/
jest.config.cjs
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
const config = {
testEnvironment: 'node',
roots: ['<rootDir>/test'],
preset: 'ts-jest',
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|tsx|js|jsx|mjs)?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', 'mjs'],
// coverage shouldn't include node_modules or imported files
coveragePathIgnorePatterns: [
'/node_modules/',
'peanut-sdk/node_modules/',
'<rootDir>/src/test/',
'<rootDir>/node_modules/',
],
transformIgnorePatterns: [
'/node_modules/(?!(\\@squirrel-labs\\/peanut-sdk)/)',
'/node_modules/(?!(\\@squirrel-labs\\/peanut-sdk)/)',
],
testPathIgnorePatterns: ['<rootDir>/src/test/manual/'],
// try to test directly on index.js
// moduleDirectories: ["node_modules", "src"],
// moduleNameMapper: {
// "@squirrel-labs/peanut-sdk": "<rootDir>/index.js"
// },
// transformIgnorePatterns: ["<rootDir>/node_modules/"],
}
module.exports = config