Skip to content

Commit

Permalink
cover ppr test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jun 23, 2024
1 parent b5b2b47 commit 7a1a0a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/e2e/app-dir/not-found/default/default.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { nextTestSetup } from 'e2e-utils'

const isPPREnabled = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'

describe('app dir - not-found - default', () => {
const { next, isNextStart } = nextTestSetup({
files: __dirname,
Expand All @@ -14,7 +16,9 @@ describe('app dir - not-found - default', () => {
if (isNextStart) {
it('should contain noindex contain in the page', async () => {
const html = await next.readFile('.next/server/app/_not-found.html')
const rsc = await next.readFile('.next/server/app/_not-found.rsc')
const rsc = await next.readFile(
`.next/server/app/_not-found.${isPPREnabled ? 'prefetch.' : ''}rsc`
)

expect(html).toContain('noindex')
expect(rsc).toContain('noindex')
Expand Down

0 comments on commit 7a1a0a7

Please sign in to comment.