Skip to content

Commit d972ded

Browse files
author
Luca Forstner
authored
test(nextjs): Fix integration tests for Next.js 13.0.7 (#6556)
1 parent d9963fc commit d972ded

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

packages/nextjs/test/integration/pages/[id]/withInitialProps.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import Link from 'next/link';
33
const WithInitialPropsPage = ({ data }: { data: string }) => (
44
<>
55
<h1>WithInitialPropsPage {data}</h1>
6-
<Link href="/1337/withServerSideProps">
6+
{/*
7+
// @ts-ignore https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag */}
8+
<Link href="/1337/withServerSideProps" passHref legacyBehavior>
79
<a id="server-side-props-page">Go to withServerSideProps</a>
810
</Link>
911
</>

packages/nextjs/test/integration/pages/[id]/withServerSideProps.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import Link from 'next/link';
33
const WithServerSidePropsPage = ({ data }: { data: string }) => (
44
<>
55
<h1>WithServerSidePropsPage {data}</h1>
6-
<Link href="/3c2e87573d/withInitialProps">
6+
{/*
7+
// @ts-ignore https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag */}
8+
<Link href="/3c2e87573d/withInitialProps" passHref legacyBehavior>
79
<a id="initial-props-page">Go to withInitialProps</a>
810
</Link>
911
</>

packages/nextjs/test/integration/pages/alsoHealthy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import Link from 'next/link';
22

33
const HealthyPage = (): JSX.Element => (
4-
<Link href="/healthy">
4+
// @ts-ignore https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag
5+
<Link href="/healthy" passHref legacyBehavior>
56
<a id="healthy">Healthy</a>
67
</Link>
78
);

packages/nextjs/test/integration/pages/healthy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import Link from 'next/link';
22

33
const HealthyPage = (): JSX.Element => (
4-
<Link href="/alsoHealthy">
4+
// @ts-ignore https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag
5+
<Link href="/alsoHealthy" passHref legacyBehavior>
56
<a id="alsoHealthy">AlsoHealthy</a>
67
</Link>
78
);

packages/nextjs/test/integration/pages/users/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ const WithStaticProps = ({ items }: Props) => (
1919
<p>You are currently on: /users</p>
2020
<List items={items} />
2121
<p>
22-
<Link href="/">
22+
{/*
23+
// @ts-ignore https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag */}
24+
<Link href="/" passHref legacyBehavior>
2325
<a>Go home</a>
2426
</Link>
2527
</p>

0 commit comments

Comments
 (0)