DAG: expose deterministic recompute levels
This commit is contained in:
@@ -240,9 +240,12 @@ test('dependency graph propagates dirty state and orders dependencies', () => {
|
||||
const plan = graph.plan(['pad'])
|
||||
assert.deepEqual(plan.cycles, [])
|
||||
assert.deepEqual(plan.order, ['pad', 'pocket', 'fillet', 'body'])
|
||||
assert.deepEqual(plan.levels, [['pad'], ['pocket'], ['fillet'], ['body']])
|
||||
assert.deepEqual(plan.affected, ['pad', 'pocket', 'fillet', 'body'])
|
||||
graph.addEdge({ sourceId: 'pad', targetId: 'body', relation: 'expression' })
|
||||
assert.deepEqual(graph.findCycles(new Set(['pad', 'pocket', 'fillet', 'body'])), [['pad', 'pocket', 'fillet', 'body']])
|
||||
const branched = new DependencyGraph([{ sourceId: 'left', targetId: 'root', relation: 'link' }, { sourceId: 'right', targetId: 'root', relation: 'link' }], ['root', 'left', 'right'])
|
||||
assert.deepEqual(branched.plan(['root']).levels, [['root'], ['left', 'right']])
|
||||
})
|
||||
|
||||
test('generation-aware recompute cancels an older run before accepting its result', async () => {
|
||||
|
||||
Reference in New Issue
Block a user