File tree Expand file tree Collapse file tree 5 files changed +2512
-38
lines changed Expand file tree Collapse file tree 5 files changed +2512
-38
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ "roots" : [
3
+ "./src"
4
+ ] ,
5
+ "transform" : {
6
+ "^.+\\.tsx?$" : "ts-jest"
7
+ } ,
8
+ "testRegex" : "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$" ,
9
+ "moduleFileExtensions" : [
10
+ "ts" ,
11
+ "tsx" ,
12
+ "js" ,
13
+ ] ,
14
+ moduleNameMapper : {
15
+ '\\.(css)$' : '<rootDir>/src/__tests__/styleMock.js' ,
16
+ } ,
17
+ }
Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"build" : " webpack --mode production" ,
8
8
"dev" : " webpack-dev-server" ,
9
+ "test" : " jest" ,
9
10
"typecheck" : " tsc -p . --noEmit"
10
11
},
11
12
"devDependencies" : {
13
+ "@types/jest" : " ^25.2.3" ,
12
14
"@types/react" : " ^16.9.35" ,
13
15
"@types/react-dom" : " ^16.9.8" ,
14
16
"css-loader" : " ^3.5.3" ,
15
17
"html-webpack-plugin" : " ^4.3.0" ,
18
+ "jest" : " ^26.0.1" ,
16
19
"style-loader" : " ^1.2.1" ,
20
+ "ts-jest" : " ^26.0.0" ,
17
21
"ts-loader" : " ^7.0.4" ,
18
22
"typescript" : " ^3.9.3" ,
19
23
"webpack" : " ^4.43.0" ,
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
- import App from './App' ;
3
+ import App from '.. /App' ;
4
4
5
5
it ( 'renders without crashing' , ( ) => {
6
6
const div = document . createElement ( 'div' ) ;
Original file line number Diff line number Diff line change
1
+ module . exports = { } ;
You can’t perform that action at this time.
0 commit comments