Skip to content

Commit

Permalink
fix turbopack test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed May 15, 2024
1 parent 87f3690 commit 6bc0a95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/module-layer/module-layer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { nextTestSetup } from 'e2e-utils'
import { getRedboxSource, hasRedbox, retry } from 'next-test-utils'

describe('module layer', () => {
const { next, isNextStart, isNextDev } = nextTestSetup({
const { next, isNextStart, isNextDev, isTurbopack } = nextTestSetup({
files: __dirname,
})

Expand Down Expand Up @@ -85,7 +85,9 @@ describe('module layer', () => {
expect(await hasRedbox(browser)).toBe(true)
const source = await getRedboxSource(browser)
expect(source).toContain(
`You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client"`
isTurbopack
? `'client-only' cannot be imported from a Server Component module. It should only be used from a Client Component.`
: `You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client"`
)
})
})
Expand Down

0 comments on commit 6bc0a95

Please sign in to comment.