-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
47 lines (44 loc) · 2.07 KB
/
jest.config.ts
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
42
43
44
45
46
47
/*
* Copyright (C) 2023-2024 brittni and the polar bear LLC.
*
* This file is a part of brittni and the polar bear's @batpb/genart algorithmic art library,
* which is released under the GNU Affero General Public License, Version 3.0.
* You may not use this file except in compliance with the license.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. See LICENSE or go to
* https://www.gnu.org/licenses/agpl-3.0.en.html for full license details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License for more details.
*/
import type { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
collectCoverage: true,
coverageDirectory: './out/tests-coverage',
coverageReporters: ['text', 'lcov', 'json', 'json-summary'],
errorOnDeprecated: true,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'mjs', 'cjs', 'json', 'node'],
moduleNameMapper: {
// '^color$': '<rootDir>/src/main/color'
// '^discriminator$': '<rootDir>/src/main/discriminator',
// '^map$': '<rootDir>/src/main/map',
// '^math$': '<rootDir>/src/main/math',
// '^palette$': '<rootDir>/src/main/color/palette',
// '^palette-colors$': '<rootDir>/src/main/color/palette/palette-colors',
// '^palettes$': '<rootDir>/src/main/color/palette/palettes',
// '^random$': '<rootDir>/src/main/random',
// '^screen$': '<rootDir>/src/main/screen',
// '^string$': '<rootDir>/src/main/string',
// '^sketch-context$': '<rootDir>/src/main/sketch',
// '^unit-test/shared$': '<rootDir>/src/test/shared',
// '^color-name-list$': '<rootDir>/node_modules/color-name-list'
},
testEnvironment: '@happy-dom/jest-environment',
testRegex: './src/test/.*\\.(test|spec)?\\.(ts|tsx)$',
transform: { '^.+\\.(ts|tsx)$': 'ts-jest' },
verbose: true
};
export default config;