File tree 5 files changed +12
-8
lines changed
5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ module.exports = {
2
2
preset : 'ts-jest' ,
3
3
testEnvironment : 'jsdom' ,
4
4
testPathIgnorePatterns : [ 'example' , 'node_modules' ] ,
5
- setupFiles : [ '@testing-library/react/dont-cleanup-after-each' ] ,
6
5
moduleNameMapper : {
7
6
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$' :
8
7
'<rootDir>/__mocks__/fileMock.js' ,
File renamed without changes.
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import '@testing-library/jest-dom';
3
3
import Main from '../index' ;
4
4
5
5
describe ( 'My Component' , ( ) => {
6
- it ( 'renders displays the passed message' , async ( ) => {
6
+ it ( 'displays the passed message' , async ( ) => {
7
7
const { findByText } = render ( < Main message = "Hello World" /> ) ;
8
8
const content = await findByText ( 'Hello World' ) ;
9
9
expect ( content ) . toBeTruthy ( ) ;
10
10
} ) ;
11
- it ( 'renders displays the default message' , async ( ) => {
11
+ it ( 'displays the default message' , async ( ) => {
12
12
const { findByText } = render ( < Main /> ) ;
13
13
const content = await findByText ( 'No Message' ) ;
14
14
expect ( content ) . toBeTruthy ( ) ;
Original file line number Diff line number Diff line change 12
12
/* eslint-disable @typescript-eslint/no-var-requires */
13
13
/* eslint-disable @typescript-eslint/no-explicit-any */
14
14
15
+ // eslint-disable-next-line dot-notation
15
16
if ( process . env [ 'RTL_SKIP_POSTINSTALL' ] ) {
16
17
console . log ( 'Skipping post-install process...' ) ;
17
18
process . exit ( 0 ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
3
"target" : " es5" ,
4
- "module" : " ES6 " ,
4
+ "module" : " ESNext " ,
5
5
"lib" : [
6
6
" ES2017" ,
7
7
" ES7" ,
10
10
],
11
11
"declaration" : true ,
12
12
"declarationDir" : " dist" ,
13
+ "declarationMap" : true ,
14
+ "downlevelIteration" : false ,
13
15
"outDir" : " dist" ,
14
16
"sourceMap" : true ,
15
17
"strict" : true ,
22
24
"resolveJsonModule" : true ,
23
25
"jsx" : " react-jsx" ,
24
26
"baseUrl" : " ./src" ,
27
+ "paths" : {
28
+ "tslib" : [
29
+ " node_modules/tslib/tslib.d.ts"
30
+ ]
31
+ },
25
32
"plugins" : [
26
33
{
27
34
"name" : " typescript-plugin-css-modules"
28
35
}
29
36
],
30
37
},
31
38
"include" : [
32
- " src/**/*" ,
33
- " Globals.d.ts"
39
+ " src/**/*"
34
40
],
35
41
"exclude" : [
36
42
" node_modules" ,
37
43
" dist" ,
38
- " src/**/*.spec.tsx" ,
39
- " src/**/*.test.tsx"
40
44
]
41
45
}
You can’t perform that action at this time.
0 commit comments