Skip to content

Commit 750780d

Browse files
committed
Use jest specific typescript config
1 parent 8224577 commit 750780d

4 files changed

+3
-13
lines changed

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
roots: ["<rootDir>/src"],
33
globals: {
44
'ts-jest': {
5-
tsConfig: 'tsconfig.json'
5+
tsConfig: 'tsconfig.jest.json'
66
}
77
},
88
transform: {

src/useCurrentEffect.test.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ describe("useCurrentEffect", () => {
9494
expect(testCleanup).toHaveBeenCalledTimes(2);
9595
});
9696

97-
const delay = async (ms: number) =>
98-
new Promise((resolve: TimerHandler, reject: any) => {
99-
setTimeout(resolve, ms);
100-
});
101-
10297
it("Sets isCurrent result to false when the dependencies change", async () => {
10398
const spy = jest.fn();
10499

tsconfig.jest.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
"noImplicitAny": true,
66
"removeComments": true,
77
"preserveConstEnums": true,
8-
"sourceMap": true,
9-
"declaration": true,
10-
"declarationDir": "./dist",
11-
"outDir": "./dist",
12-
"lib": ["es2015","dom"],
8+
"lib": ["es2015", "dom"],
139
"jsx": "react"
1410
},
1511
"include": ["src/**/*"],

tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"declaration": true,
1010
"declarationDir": "./dist",
1111
"outDir": "./dist",
12-
"lib": ["es2015","dom"],
13-
"jsx": "react"
12+
"lib": ["es2015"]
1413
},
1514
"include": ["src/**/*"],
1615
"exclude": ["./node_modules/**/*", "src/**/*.test.tsx"]

0 commit comments

Comments
 (0)