Skip to content

Commit 34c5ce5

Browse files
test: migrate Enzyme tests to React Testing Library
Replace all 21 Enzyme test files with React Testing Library equivalents. Remove enzyme, enzyme-adapter-react-16, enzyme-to-json and their @types packages. Remove Enzyme config from tests/setup.ts and vitest.config.ts. Delete commands-spec.tsx (RTL equivalents already exist in rtl-spec/). Delete all Enzyme-generated snapshot files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ee5c030 commit 34c5ce5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1173
-5004
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@
9898
"@testing-library/user-event": "^14.5.2",
9999
"@tsconfig/node22": "^22.0.2",
100100
"@types/classnames": "^2.2.11",
101-
"@types/enzyme": "^3.10.8",
102-
"@types/enzyme-adapter-react-16": "^1.0.6",
103101
"@types/fs-extra": "^9.0.7",
104102
"@types/getos": "^3.0.1",
105103
"@types/node": "^22.19.1",
@@ -116,9 +114,6 @@
116114
"copy-webpack-plugin": "^11.0.0",
117115
"css-loader": "^6.7.1",
118116
"electron": "^40.1.0",
119-
"enzyme": "^3.11.0",
120-
"enzyme-adapter-react-16": "^1.15.7",
121-
"enzyme-to-json": "^3.6.1",
122117
"eslint": "^8.45.0",
123118
"eslint-config-prettier": "^8.8.0",
124119
"eslint-import-resolver-typescript": "^3.5.5",

src/renderer/components/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const Output = observer(
133133

134134
const { isConsoleShowing } = this.props.appState;
135135

136-
if (this.context.mosaicActions) {
136+
if (this.context?.mosaicActions) {
137137
const mosaicTree = this.context.mosaicActions.getRoot();
138138
if (isParentNode(mosaicTree)) {
139139
// splitPercentage defines the percentage of space the first panel takes

tests/renderer/components/__snapshots__/commands-spec.tsx.snap

Lines changed: 0 additions & 112 deletions
This file was deleted.

tests/renderer/components/__snapshots__/dialog-add-theme-spec.tsx.snap

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)