-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
43 lines (36 loc) · 1.53 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
37
38
39
40
41
42
43
/**
* Free Touch Pricker
* @author Leigh Simpson <code@simpleigh.com>
* @license GPL-3.0
* @copyright Copyright 2015-23 Leigh Simpson. All rights reserved.
*/
/**
* Configuration for Jest
* @see https://jestjs.io/docs/configuration
*/
'use strict';
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
// An array of glob patterns indicating a set of files for which coverage
// information should be collected.
// @see https://jestjs.io/docs/configuration/#collectcoveragefrom-array
collectCoverageFrom: ['src/**/*.ts', '!src/**/test*.ts'],
// Sets the path to the `prettier` node module used to update inline
// snapshots.
// @see https://jestjs.io/docs/configuration/#prettierpath-string
// @see https://github.com/jestjs/jest/issues/14305
prettierPath: null,
// A list of paths to modules that run some code to configure or set up the
// testing framework before each test file in the suite is executed.
// @see https://jestjs.io/docs/configuration/#setupfilesafterenv-array
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
// The test environment that will be used for testing.
// @see https://jestjs.io/docs/configuration/#testenvironment-string
testEnvironment: 'jsdom',
// A map from regular expressions to paths to transformers.
// @see https://jestjs.io/docs/configuration/#transform-objectstring-pathtotransformer--pathtotransformer-object
transform: {
'^.+\\.dot$': './dotTransformer.js',
'^.+\\.ts$': 'ts-jest',
},
};