Cycles: fix!

cycles-detection-with-context
Alexandre Hajjar 2020-05-08 19:24:59 +02:00
parent b3f51d825e
commit 00bb5838d7
1 changed files with 4 additions and 2 deletions

View File

@ -19,11 +19,13 @@ describe('DottedNames graph', () => {
ruleDependencies.forEach(([ruleDottedName, dependenciesDottedNames]) => {
dependenciesDottedNames.forEach(depDottedName => {
g.setNode(ruleDottedName, depDottedName)
g.setEdge(ruleDottedName, depDottedName)
})
})
const cycles = graphlib.alg.findCycles(g)
expect(cycles).to.be.an('array').that.is.empty
expect(cycles, `There are cycles: ${JSON.stringify(cycles)}`).to.be.an(
'array'
).that.is.empty
})
})