import { computeChangedPath } from './compute-changed-path'
import { PrefetchHint } from '../../../shared/lib/app-router-types'
describe('computeChangedPath', () => {
it('should return the correct path', () => {
expect(
computeChangedPath(
[
'',
{
children: [
'(marketing)',
{
children: ['__PAGE__', {}],
modal: [
'(...)stats',
{
children: [
['key', 'github', 'd', null],
{
children: ['__PAGE__', {}],
},
],
},
],
},
],
},
undefined,
undefined,
PrefetchHint.IsRootLayout,
],
[
'',
{
children: [
'(marketing)',
{
children: ['__PAGE__', {}],
modal: [
'(...)stats',
{
children: [
['key', 'github', 'd', null],
{
children: ['__PAGE__', {}],
},
],
},
],
},
],
},
undefined,
undefined,
PrefetchHint.IsRootLayout,
]
)
).toBe('/')
})
})