Skip to content

Commit 6fe3dbb

Browse files
committed
Simplify test
1 parent 08b640d commit 6fe3dbb

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

src/lib/SpecialButton/SpecialButton.test.tsx

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ describe(SpecialButton, () => {
141141
// Initial state: pending
142142
expect(screen.getByText("Click Me")).toBeInTheDocument();
143143
expect(button).not.toBeDisabled();
144-
expect(button).toHaveClass("special-button", "pending");
145144

146145
// Rerender with loading state
147146
rerender(
@@ -154,33 +153,6 @@ describe(SpecialButton, () => {
154153
button = screen.getByRole("button");
155154
expect(screen.getByText("Loading...")).toBeInTheDocument();
156155
expect(button).toBeDisabled();
157-
expect(button).toHaveClass("special-button", "loading");
158-
159-
// Rerender with success state
160-
rerender(
161-
<SpecialButton
162-
onClick={mockOnClick}
163-
state="success"
164-
/>
165-
);
166-
167-
button = screen.getByRole("button");
168-
expect(screen.getByText("Success!")).toBeInTheDocument();
169-
expect(button).not.toBeDisabled();
170-
expect(button).toHaveClass("special-button", "success");
171-
172-
// Rerender with error state
173-
rerender(
174-
<SpecialButton
175-
onClick={mockOnClick}
176-
state="error"
177-
/>
178-
);
179-
180-
button = screen.getByRole("button");
181-
expect(screen.getByText("Error!")).toBeInTheDocument();
182-
expect(button).not.toBeDisabled();
183-
expect(button).toHaveClass("special-button", "error");
184156
});
185157

186158

0 commit comments

Comments
 (0)