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