Skip to content

Commit 26b4de1

Browse files
committed
patch console-testing-library-types and disable skipLibCheck
1 parent 08b92bd commit 26b4de1

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/index.d.ts b/index.d.ts
2+
index 1dbf70a6fdf4369188ad44166aee188c8efd2054..56b85e26b2b3030bc3407aab2b358fd4e5e39c6a 100644
3+
--- a/index.d.ts
4+
+++ b/index.d.ts
5+
@@ -1,4 +1,4 @@
6+
-export const originalConsole = Console;
7+
+export declare const originalConsole: Console;
8+
9+
type Options = {
10+
isSilent?: boolean;
11+
@@ -24,14 +24,13 @@ export type TestingConsoleInstance = {
12+
};
13+
getRecord: (method: string) => string;
14+
silence: boolean;
15+
- private _targetConsole: TestingConsole | Console;
16+
};
17+
18+
export function createConsole(options?: Options): TestingConsole;
19+
20+
export function mockConsole(
21+
testingConsole: TestingConsole,
22+
- targetConsoleParent?: {} = global,
23+
+ targetConsoleParent?: typeof globalThis,
24+
targetConsoleKey?: string
25+
): () => void;
26+

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
},
3737
"resolutions": {
3838
"react-scripts": "patch:react-scripts@npm:4.0.2#.yarn/patches/react-scripts__npm_4.0.2.patch",
39+
"console-testing-library": "patch:console-testing-library@npm:0.3.1#.yarn/patches/console-testing-library__npm_0.3.1.patch",
3940
"react-redux": "npm:7.2.4",
4041
"react": "npm:17.0.2",
4142
"react-dom": "npm:17.0.2"

packages/toolkit/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"target": "es2018",
1212
"jsx": "react",
1313
"baseUrl": ".",
14-
"skipLibCheck": true,
14+
"skipLibCheck": false,
1515
"noImplicitReturns": false
1616
}
1717
}

yarn.lock

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9913,7 +9913,7 @@ __metadata:
99139913
languageName: node
99149914
linkType: hard
99159915

9916-
"console-testing-library@npm:^0.3.1":
9916+
"console-testing-library@npm:0.3.1":
99179917
version: 0.3.1
99189918
resolution: "console-testing-library@npm:0.3.1"
99199919
dependencies:
@@ -9923,6 +9923,16 @@ __metadata:
99239923
languageName: node
99249924
linkType: hard
99259925

9926+
"console-testing-library@patch:console-testing-library@npm:0.3.1#.yarn/patches/console-testing-library__npm_0.3.1.patch::locator=rtk-monorepo%40workspace%3A.":
9927+
version: 0.3.1
9928+
resolution: "console-testing-library@patch:console-testing-library@npm%3A0.3.1#.yarn/patches/console-testing-library__npm_0.3.1.patch::version=0.3.1&hash=790984&locator=rtk-monorepo%40workspace%3A."
9929+
dependencies:
9930+
jest-snapshot: ^24.9.0
9931+
pretty-format: ^24.9.0
9932+
checksum: 8cf742ea934f40d9c6a71f2c975fb42a93fc24ffaf9b78d98d9cfd420f705bb2e31738d07273d5ce1d099255a6314df3a247a9a8eb6e228d586f8743cdb2565e
9933+
languageName: node
9934+
linkType: hard
9935+
99269936
"constant-case@npm:^3.0.4":
99279937
version: 3.0.4
99289938
resolution: "constant-case@npm:3.0.4"

0 commit comments

Comments
 (0)