fix: fix tree test

This commit is contained in:
yvonneyx 2024-09-25 10:10:01 +08:00
parent ccd2cc6f06
commit 3cde03aa40

View File

@ -11,9 +11,10 @@ describe('tree', () => {
nodes: [
{
id: 'root',
depth: 0,
children: ['child'],
},
{ id: 'child' },
{ id: 'child', depth: 1 },
],
edges: [{ source: 'root', target: 'child' }],
});
@ -30,10 +31,11 @@ describe('tree', () => {
{
id: 'root',
children: ['child'],
depth: 0,
style: { fill: 'red' },
data: { value: 10 },
},
{ id: 'child', style: { fill: 'green' }, data: { value: 1 } },
{ id: 'child', depth: 1, style: { fill: 'green' }, data: { value: 1 } },
],
edges: [{ source: 'root', target: 'child' }],
});
@ -59,10 +61,11 @@ describe('tree', () => {
{
id: 'root',
children: ['child'],
depth: 0,
style: { fill: 'red' },
data: { value: 10 },
},
{ id: 'child', style: { fill: 'green' }, data: { value: 1 } },
{ id: 'child', depth: 1, style: { fill: 'green' }, data: { value: 1 } },
],
edges: [{ source: 'root', target: 'child', data: { weight: 11 } }],
});