Skip to content

Commit

Permalink
fix: fix tree test
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonneyx committed Sep 25, 2024
1 parent ccd2cc6 commit 3cde03a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/g6/__tests__/unit/utils/tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ describe('tree', () => {
nodes: [
{
id: 'root',
depth: 0,
children: ['child'],
},
{ id: 'child' },
{ id: 'child', depth: 1 },
],
edges: [{ source: 'root', target: 'child' }],
});
Expand All @@ -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' }],
});
Expand All @@ -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 } }],
});
Expand Down

0 comments on commit 3cde03a

Please sign in to comment.