Skip to content

Commit

Permalink
Adjust error case expectation for PPR
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Dec 17, 2024
1 parent 3dea6a9 commit 417ae25
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import cheerio from 'cheerio'
;(process.env.TURBOPACK ? describe.skip : describe)(
'Subresource Integrity',
() => {
describe.each(['node', 'edge'])('with %s runtime', (runtime) => {
describe.each(['node', 'edge'] as const)('with %s runtime', (runtime) => {
const { next } = nextTestSetup({
files: path.join(__dirname, 'fixture'),
})
Expand Down Expand Up @@ -221,7 +221,11 @@ import cheerio from 'cheerio'
`script-src 'nonce-"><script></script>"'`
)

expect(res.status).toBe(500)
if (runtime === 'node' && process.env.__NEXT_EXPERIMENTAL_PPR) {
expect(res.status).toBe(200)
} else {
expect(res.status).toBe(500)
}
})
})
}
Expand Down

0 comments on commit 417ae25

Please sign in to comment.