Skip to content

Commit

Permalink
Test Cases vercel#17274
Browse files Browse the repository at this point in the history
  • Loading branch information
itz-Me-Pj committed Jan 26, 2024
1 parent 5f4b5b0 commit fbc34f5
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test/integration/dynamic-routing/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1156,11 +1156,30 @@ function runTests({ dev }) {
}
`
)
await check(async () => {
const response = await fetch(
'/_next/static/development/_devPagesManifest.json',
{
credentials: 'same-origin',
}
)

// Check if the response was successful (status code in the range 200-299)
if (!response.ok) {
return 'fail'
}

const contents = await response.text()
const containsAddedLater = contents.includes('added-later')

return containsAddedLater ? 'success' : 'fail'
}, 'success')

await check(async () => {
const contents = await renderViaHTTP(
appPort,
'/_next/static/development/_devPagesManifest.json'
'/_next/static/development/_devPagesManifest.json',
{ credentials: 'same-origin' }
)
return contents.includes('added-later') ? 'success' : 'fail'
}, 'success')
Expand Down

0 comments on commit fbc34f5

Please sign in to comment.