Unverified Commit 093675fa authored by Kenji's avatar Kenji Committed by GitHub

docs(02-jest): fixes failing test in the tutorial (#61272)

### What?

This PR fixes the example test provided on [Setting up Jest with
Next.js: Creating your first
test:](https://nextjs.org/docs/app/building-your-application/testing/jest#creating-your-first-test)
not passing due to Jest not being compatible with async Server
Components.

### Why?

Although it's noted at the start of the tutorial that async Server
Components aren't currently supported by Jest, the example test failing
might confuse the reader.

### How?

This PR makes the example test pass by removing async from the `<Home>`
component
Co-authored-by: 's avatarSam Ko <sam@vercel.com>
parent 98be3ba2
......@@ -303,7 +303,7 @@ For example, we can add a test to check if the `<Page />` component successfully
```jsx filename="app/page.js
import Link from 'next/link'
export default async function Home() {
export default function Home() {
return (
<div>
<h1>Home</h1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment