|
|
@@ -1,20 +1,20 @@
|
|
|
import BaseMenu from "~/use/layout/Menus/baseMenu";
|
|
|
|
|
|
test('test constructMenu', () => {
|
|
|
- const menuWithoutChildren = new BaseMenu({'baseURL_adminLegacy': 'base_url'}).constructMenu('icon', 'children', '/url', false)
|
|
|
+ const menuWithoutChildren = new BaseMenu({'baseURL_adminLegacy': 'base_url'}).constructMenu('children', 'icon', '/url', false)
|
|
|
expect(menuWithoutChildren).toStrictEqual({
|
|
|
- "icon": "icon",
|
|
|
"title": "children",
|
|
|
+ "icon": "icon",
|
|
|
"to": "/url",
|
|
|
"isExternalLink": false
|
|
|
});
|
|
|
|
|
|
- const menuWithChildren = new BaseMenu({'baseURL_adminLegacy': 'base_url'}).constructMenu('icon', 'parent', undefined, undefined, [menuWithoutChildren])
|
|
|
+ const menuWithChildren = new BaseMenu({'baseURL_adminLegacy': 'base_url'}).constructMenu('parent', 'icon', undefined, undefined, [menuWithoutChildren])
|
|
|
expect(menuWithChildren).toStrictEqual({
|
|
|
"children": [
|
|
|
{
|
|
|
- "icon": "icon",
|
|
|
"title": "children",
|
|
|
+ "icon": "icon",
|
|
|
"to": "/url",
|
|
|
"isExternalLink": false
|
|
|
}
|