mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
fix(build): Improve warning message if menu’s page not found
This commit is contained in:
parent
4cdf89182c
commit
7df576a268
@ -75,7 +75,7 @@ async function buildMenu({ components, context }) {
|
||||
await Promise.all(
|
||||
missingPageWarnings.map(async (warning) => {
|
||||
await context.logger.warn(
|
||||
`Page ${warning.pageId} referenced in menu link ${warning.menuItemId} not found.`
|
||||
`Page "${warning.pageId}" referenced in menu link "${warning.menuItemId}" not found.`
|
||||
);
|
||||
})
|
||||
);
|
||||
|
@ -267,7 +267,7 @@ test('buildMenu page does not exist', async () => {
|
||||
pages: [],
|
||||
});
|
||||
expect(mockLogWarn.mock.calls).toEqual([
|
||||
['Page page_1 referenced in menu link menu_page_1 not found.'],
|
||||
['Page "page_1" referenced in menu link "menu_page_1" not found.'],
|
||||
]);
|
||||
});
|
||||
|
||||
@ -343,8 +343,8 @@ test('buildMenu page does not exist, nested', async () => {
|
||||
pages: [],
|
||||
});
|
||||
expect(mockLogWarn.mock.calls).toEqual([
|
||||
['Page page_1 referenced in menu link menu_page_1 not found.'],
|
||||
['Page page_2 referenced in menu link menu_page_2 not found.'],
|
||||
['Page "page_1" referenced in menu link "menu_page_1" not found.'],
|
||||
['Page "page_2" referenced in menu link "menu_page_2" not found.'],
|
||||
]);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user