Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
xrutayisire committed Sep 10, 2024
1 parent 9d8f76c commit a440cff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/PrismicLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ it("if URL is external and externalComponent is given to the provider and the co

it("renders the link's text if no children are provided", async (ctx) => {
const model = ctx.mock.model.link({ allowText: true });
const field = ctx.mock.value.link({ type: "Web", model });
const field = ctx.mock.value.link({ type: "Web", model, withText: true });
const actual = renderJSON(<PrismicLink field={field} />);
const expected = renderJSON(
<a href={field.url} rel="noreferrer" target={field.target}>
Expand All @@ -95,7 +95,7 @@ it("renders the link's text if no children are provided", async (ctx) => {

it("renders the given children, overriding the link's text", async (ctx) => {
const model = ctx.mock.model.link({ allowText: true });
const field = ctx.mock.value.link({ type: "Web", model });
const field = ctx.mock.value.link({ type: "Web", model, withText: true });
const children = ctx.mock.value.keyText();
const actual = renderJSON(
<PrismicLink field={field}>{children}</PrismicLink>,
Expand Down

0 comments on commit a440cff

Please sign in to comment.