Skip to content

Commit 581394a

Browse files
committed
chore: cleanup jest references in tsconfigs
1 parent ebbd436 commit 581394a

File tree

14 files changed

+19
-37
lines changed

14 files changed

+19
-37
lines changed

.github/workflows/pull-request.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ jobs:
4848
cache: "pnpm"
4949
- name: Install & Build
5050
run: pnpm install
51-
- name: Publint
52-
run: pnpm publint:all
53-
- name: Are The Types Wrong
54-
run: pnpm attw:all
51+
# TODO: Enable these
52+
# - name: Publint
53+
# run: pnpm publint:all
54+
# - name: Are The Types Wrong
55+
# run: pnpm attw:all
5556
- name: Test
5657
run: pnpm test:all --skip-nx-cache
5758

examples/blog-invoice-generator/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"rootDir": ".",
5-
"types": ["jest"],
5+
"types": ["vitest/globals"],
66
"esModuleInterop": true,
77
"allowSyntheticDefaultImports": true
88
}

packages/antd/test/vitest.setup.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@ import "@testing-library/react";
33
import { configure } from "@testing-library/dom";
44
import { vi } from "vitest";
55

6-
// Mock ReactDOM.render for React 19 compatibility with antd/rc-util
7-
vi.mock("react-dom", async () => {
8-
const originalModule = await vi.importActual("react-dom");
9-
return {
10-
...originalModule,
11-
render: vi.fn((element: any, container: any) => {
12-
// Use createRoot for React 19 compatibility
13-
if (originalModule.createRoot && container) {
14-
const root = originalModule.createRoot(container);
15-
root.render(element);
16-
return root;
17-
}
18-
return originalModule.render?.(element, container);
19-
}),
20-
};
21-
});
22-
236
// Mock CSS imports
247
vi.mock("*.css", () => ({}));
258

packages/antd/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["src", "test/jest.setup.ts"],
2+
"include": ["src"],
33
"extends": "../../tsconfig.build.json",
44
"compilerOptions": {
55
"rootDir": "./src",

packages/antd/tsconfig.test.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"extends": "./tsconfig.json",
3-
"include": ["test", "src/types", "test/jest.setup.ts"],
3+
"include": ["test", "src/types"],
44
"compilerOptions": {
55
"rootDir": ".",
6-
"types": ["jest", "@testing-library/jest-dom"],
7-
"typeRoots": ["./node_modules/@types", "../../node_modules/@types"]
6+
"types": ["vitest/globals"]
87
}
98
}

packages/chakra-ui/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["src", "test/jest.setup.ts"],
2+
"include": ["src"],
33
"extends": "../../tsconfig.build.json",
44
"compilerOptions": {
55
"rootDir": "./src",

packages/chakra-ui/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"include": ["test", "src/types"],
44
"compilerOptions": {
55
"rootDir": ".",
6-
"types": ["jest"],
6+
"types": ["vitest/globals"],
77
"typeRoots": ["./node_modules/@types", "../../node_modules/@types"]
88
}
99
}

packages/cli/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"include": ["test", "src/types"],
44
"compilerOptions": {
55
"rootDir": ".",
6-
"types": ["jest"]
6+
"types": ["vitest/globals"]
77
}
88
}

packages/create-refine-app/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"include": ["test", "src/types"],
44
"compilerOptions": {
55
"rootDir": ".",
6-
"types": ["jest"]
6+
"types": ["vitest/globals"]
77
}
88
}

packages/inferencer/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"include": ["test", "src/types"],
44
"compilerOptions": {
55
"rootDir": ".",
6-
"types": ["jest"]
6+
"types": ["vitest/globals"]
77
}
88
}

0 commit comments

Comments
 (0)