030fd1d684
Add unique identifier `@app@` / `@pages@` / `@root@` for entry key of on demand entries, so that they'll be unique for each path when the page key is similar bewteen app and pages like (`"app/page"` and `"pages/page"` will both end up with `/page`) ## Bug Follow up for #46736 Closes NEXT-472 - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ---------
21 lines
604 B
TypeScript
21 lines
604 B
TypeScript
import { createNextDescribe } from 'e2e-utils'
|
|
|
|
createNextDescribe(
|
|
'app-dir similar pages paths',
|
|
{
|
|
files: __dirname,
|
|
skipDeployment: true,
|
|
},
|
|
({ next }) => {
|
|
it('should not have conflicts for similar pattern page paths between app and pages', async () => {
|
|
// pages/page and app/page
|
|
const res1 = await next.fetch('/')
|
|
expect(res1.status).toBe(200)
|
|
expect(await res1.text()).toContain('(app/page.js)')
|
|
|
|
const res2 = await next.fetch('/page')
|
|
expect(res2.status).toBe(200)
|
|
expect(await res2.text()).toContain('(pages/page.js)')
|
|
})
|
|
}
|
|
)
|