Unverified Commit a9c4a44a authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update middleware prefetch test (#79025)

parent d1ee0f0c
......@@ -62,9 +62,7 @@ describe('Middleware Production Prefetch', () => {
)
// Check if the filename follows the format `static/chunks/pages/[pagename]-[hash].js`
// and specifically targets files containing '/ssg-page-' in their path.
return attrs.find((src) => src.includes('/ssg-page-'))
? 'yes'
: 'nope'
return attrs.find((src) => src.includes('/ssg-page')) ? 'yes' : 'nope'
}, 'yes')
})
......@@ -76,7 +74,9 @@ describe('Middleware Production Prefetch', () => {
const attrs = await Promise.all(
scripts.map((script) => script.getAttribute('src'))
)
return attrs.find((src) => src.includes('/ssg-page-2-'))
return attrs.find((src) =>
src.includes('/ssg-page-2' + (process.env.NEXT_RSPACK ? '-' : ''))
)
? 'nope'
: 'yes'
}, 'yes')
......
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