Skip to content

Commit 68e622b

Browse files
committed
fix: apply prettier formatting to test files
1 parent 86b0de2 commit 68e622b

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

src/test/click_outside_wrapper_test.test.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ describe("ClickOutsideWrapper", () => {
7676
*/
7777
it("should apply custom className", () => {
7878
const { container } = render(
79-
<ClickOutsideWrapper
80-
onClickOutside={jest.fn()}
81-
className="custom-class"
82-
>
79+
<ClickOutsideWrapper onClickOutside={jest.fn()} className="custom-class">
8380
<div>Test Content</div>
8481
</ClickOutsideWrapper>,
8582
);
@@ -195,10 +192,7 @@ describe("ClickOutsideWrapper", () => {
195192
*/
196193
it("should cleanup event listener on unmount", () => {
197194
const handleClickOutside = jest.fn();
198-
const removeEventListenerSpy = jest.spyOn(
199-
document,
200-
"removeEventListener",
201-
);
195+
const removeEventListenerSpy = jest.spyOn(document, "removeEventListener");
202196

203197
const { unmount } = render(
204198
<ClickOutsideWrapper onClickOutside={handleClickOutside}>

src/test/popper_component_test.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jest.mock("../portal", () => {
1717
children: React.ReactNode;
1818
portalId: string;
1919
}) {
20-
return <div data-testid="portal" data-portal-id={portalId}>{children}</div>;
20+
return (
21+
<div data-testid="portal" data-portal-id={portalId}>
22+
{children}
23+
</div>
24+
);
2125
};
2226
});
2327

src/test/portal_test.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ describe("Portal", () => {
3838
);
3939

4040
// Content should not be in the main container (React's render root)
41-
expect(container.querySelector('[data-testid="portal-content"]')).toBeNull();
41+
expect(
42+
container.querySelector('[data-testid="portal-content"]'),
43+
).toBeNull();
4244

4345
// Content should be in the portal root (separate DOM location)
4446
const portalRoot = document.getElementById("test-portal-1");

src/test/with_floating_test.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ describe("withFloating", () => {
156156
});
157157

158158
it("should include default middleware", () => {
159-
const { useFloating, flip, offset, arrow } =
160-
require("@floating-ui/react");
159+
const { useFloating, flip, offset, arrow } = require("@floating-ui/react");
161160
const WrappedComponent = withFloating(TestComponent);
162161

163162
render(<WrappedComponent />);

src/test/year_test.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,7 @@ describe("Year", () => {
503503
<Year {...defaultProps} date={newDate()} yearItemNumber={12} />,
504504
);
505505

506-
const currentYearElement = container.querySelector(
507-
`[aria-current="date"]`,
508-
);
506+
const currentYearElement = container.querySelector(`[aria-current="date"]`);
509507
expect(currentYearElement?.textContent).toBe(String(currentYear));
510508
});
511509

0 commit comments

Comments
 (0)