diff --git a/src/runtime/server/navigation.ts b/src/runtime/server/navigation.ts index 27e2dffd0..1eaed2878 100644 --- a/src/runtime/server/navigation.ts +++ b/src/runtime/server/navigation.ts @@ -31,8 +31,10 @@ export function createNav (contents: ParsedContentMeta[], configs: Record { describe('navigation', () => { test('Get navigation', async () => { - const list = await $fetch('/api/_content/navigation/') - + const query = { where: [{ _locale: 'en' }] } + const list = await $fetch(`/api/_content/navigation/${hash(query)}`, { + params: { + _params: jsonStringify(query) + } + }) expect(list.find(item => item._path === '/')).toBeTruthy() + expect(list.find(item => item._path === '/').children).toBeUndefined() }) test('Get cats navigation', async () => {