1
+ import type { Config } from '@jest/types' ;
2
+
3
+ // module.exports = {
4
+ // verbose: true,
5
+ // setupFilesAfterEnv: ['./jest_setup/windowMock.js'],
6
+ // testEnvironment: "jsdom",
7
+ // preset: 'ts-jest/presets/js-with-ts',
8
+ // moduleNameMapper: {
9
+ // '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
10
+ // '<rootDir>/jest_setup/fileMock.js',
11
+ // '\\.(css|less|scss)$': '<rootDir>/jest_setup/styleMock.js',
12
+ // },
13
+ // collectCoverage: true,
14
+ // // types: ["jest","node"],
15
+ // };
16
+
17
+ // Convert to TypeScript
18
+ // Note: Configuring Jest to TypeScript following the docs seemed incorrect?
19
+ // @jest /types is an npm package to use to create a typed Jest config
20
+
21
+ const config : Config . InitialOptions = {
22
+ verbose : true ,
23
+ setupFilesAfterEnv : [ './jest_setup/windowMock.js' ] ,
24
+ testEnvironment : "jsdom" ,
25
+ preset : 'ts-jest/presets/js-with-ts' ,
26
+ testRegex : "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$" ,
27
+ moduleNameMapper : {
28
+ '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$' :
29
+ '<rootDir>/jest_setup/fileMock.js' ,
30
+ '\\.(css|less|scss)$' : '<rootDir>/jest_setup/styleMock.js' ,
31
+ } ,
32
+ collectCoverage : true ,
33
+ } ;
34
+
35
+ export default config ;
0 commit comments