18 lines
508 B
TypeScript
18 lines
508 B
TypeScript
|
|
import { describe, it, expect } from 'vitest';
|
||
|
|
import { buildAlertsTreeNodes } from './sidebar-utils';
|
||
|
|
|
||
|
|
describe('buildAlertsTreeNodes', () => {
|
||
|
|
it('returns 5 entries with inbox/all/rules/silences/history paths', () => {
|
||
|
|
const nodes = buildAlertsTreeNodes();
|
||
|
|
expect(nodes).toHaveLength(5);
|
||
|
|
const paths = nodes.map((n) => n.path);
|
||
|
|
expect(paths).toEqual([
|
||
|
|
'/alerts/inbox',
|
||
|
|
'/alerts/all',
|
||
|
|
'/alerts/rules',
|
||
|
|
'/alerts/silences',
|
||
|
|
'/alerts/history',
|
||
|
|
]);
|
||
|
|
});
|
||
|
|
});
|