forked from marp-team/marp-cli
/
jest.config.js
38 lines (36 loc) · 1013 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
const { jsWithBabel } = require('ts-jest/presets')
const esModules = [
'ansi-regex',
'array-union',
'chalk',
'find-up',
'globby',
'is-docker',
'locate-path',
'nanoid',
'os-locale',
'p-limit',
'p-locate',
'path-exists',
'pkg-up',
'slash',
'strip-ansi',
'yocto-queue',
]
module.exports = {
collectCoverageFrom: ['src/**/*.ts', 'src/**/*.tsx'],
coveragePathIgnorePatterns: ['/node_modules/', '.*\\.d\\.ts'],
coverageProvider: 'v8',
coverageThreshold: { global: { lines: 95 } },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFiles: ['./jest.setup.js'],
transform: {
...jsWithBabel.transform,
'\\.s?css$': '<rootDir>/test/_transformers/css.js',
'\\.png$': '<rootDir>/test/_transformers/png.js',
'\\.pug$': '<rootDir>/test/_transformers/pug.js',
},
transformIgnorePatterns: [`/node_modules/(?!${esModules.join('|')})`],
testEnvironment: 'node',
testRegex: '(/(test|__tests__)/(?![_.]).*|(\\.|/)(test|spec))\\.[jt]sx?$',
}