-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (35 loc) · 1.04 KB
/
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
// FIM - Fast Image Manipulation Library for Javascript
// Copyright (c) Leo C. Singleton IV <leo@leosingleton.com>
// See LICENSE in the project root for license information.
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/packages/'],
testMatch: ['**/__tests__/**/*.(test|node).ts'],
reporters: [
'default',
['jest-junit', {
outputDirectory: 'build/',
outputName: './results-node.xml',
}]
],
collectCoverage: true,
collectCoverageFrom: [
'**/packages/fim/**/*.ts',
'**/packages/fim-node/**/*.ts',
'!**/__tests__/**',
'!**/build/**'
],
coverageDirectory: 'build/',
coverageReporters: ['cobertura', 'text'],
moduleNameMapper: {
// Redirect the compiled NPM package back to the original TypeScript source for accurate code coverage
'^@leosingleton/fim$': '<rootDir>/packages/fim/src/index.ts',
'^@leosingleton/fim/internals$': '<rootDir>/packages/fim/src/internal/index.ts'
},
globals: {
'ts-jest': {
tsConfig: 'tsconfig.jest.json'
}
}
};