mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
16 lines
326 B
TypeScript
16 lines
326 B
TypeScript
export const backendSrv = {
|
|
get: jest.fn(),
|
|
post: jest.fn(),
|
|
};
|
|
|
|
export function createNavTree(...args) {
|
|
let root = [];
|
|
let node = root;
|
|
for (let arg of args) {
|
|
let child = { id: arg, url: `/url/${arg}`, text: `${arg}-Text`, children: [] };
|
|
node.push(child);
|
|
node = child.children;
|
|
}
|
|
return root;
|
|
}
|