mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 16:05:53 +08:00
11 lines
311 B
TypeScript
11 lines
311 B
TypeScript
import { layout } from './layeredLayout';
|
|
|
|
describe('layout', () => {
|
|
it('can render single node', () => {
|
|
const nodes = [{ id: 'A', incoming: 0 }];
|
|
const edges: unknown[] = [];
|
|
const graph = layout(nodes, edges);
|
|
expect(graph).toEqual([[{ id: 'A', incoming: 0, x: 0, y: 0 }], []]);
|
|
});
|
|
});
|