Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed Nov 28, 2024
1 parent 59f4ceb commit d965eeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/PrismicLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint react/display-name: 0 */

import { describe, expect, vi } from "vitest";
import { render } from "vitest-browser-react";
import { forwardRef } from "react";
Expand Down Expand Up @@ -264,20 +266,20 @@ it("forwards ref", async () => {
render(
<>
<PrismicLink
ref={(el) => {
ref={(el: Element | null) => {
defaultRef = el;
}}
href="/"
/>
<PrismicLink
ref={(el) => {
ref={(el: Element | null) => {
internalRef = el;
}}
internalComponent={InternalComp}
href="/"
/>
<PrismicLink
ref={(el) => {
ref={(el: Element | null) => {
externalRef = el;
}}
internalComponent={ExternalComp}
Expand Down
2 changes: 2 additions & 0 deletions test/it.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint react-hooks/rules-of-hooks: 0 */

import { MockFactory, createMockFactory } from "@prismicio/mock";
import { test } from "vitest";

Expand Down

0 comments on commit d965eeb

Please sign in to comment.