Skip to content

Commit

Permalink
fix warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeetiss committed Nov 9, 2023
1 parent 18466f5 commit 4d2fbdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 9 additions & 1 deletion packages/wouter/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,15 @@ export const Link = forwardRef((props, ref) => {
});
}

return h("a", { ...props, href: link, onClick: handleClick, to: null, ref });
return h("a", {
...props,
href: link,
onClick: handleClick,
to: null,
replace: null,
state: null,
ref,
});
});

const flattenChildren = (children) => {
Expand Down
4 changes: 1 addition & 3 deletions packages/wouter/test/link.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ describe("base link", () => {
const clickHandler = vi.fn();

const { getByTestId } = render(
<Link href="/" onClick={clickHandler}>
<a data-testid="link" />
</Link>
<Link href="/" onClick={clickHandler} data-testid="link" />
);

fireEvent.click(getByTestId("link"));
Expand Down

0 comments on commit 4d2fbdc

Please sign in to comment.