mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 07:49:43 +02:00
Restore commented test
This commit is contained in:
@@ -289,19 +289,23 @@ describe('when using mermaid and ', function () {
|
|||||||
expect(global.mermaid.parseError).not.toHaveBeenCalled()
|
expect(global.mermaid.parseError).not.toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
|
|
||||||
// todo: the following code was commented out, because digraph emits parseError infinitely
|
it('it should return false for an invalid dot definition', function () {
|
||||||
// I think it's a bug of the digraph
|
const foo = {
|
||||||
|
parseError: () => {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spyOn(foo, 'parseError')
|
||||||
|
mermaid.eventEmitter.on('parseError', (err, hash) => {
|
||||||
|
foo.parseError(err)
|
||||||
|
})
|
||||||
|
var res = mermaid.parse('digraph\n' +
|
||||||
|
'{\n' +
|
||||||
|
'a -:> b -> c -- d -> e;\n' +
|
||||||
|
'a -- e;\n' +
|
||||||
|
'}')
|
||||||
|
|
||||||
// it('it should return false for an invalid dot definition', function () {
|
expect(res).toBe(false)
|
||||||
// spyOn(global.mermaid, 'parseError')
|
expect(foo.parseError).toHaveBeenCalled()
|
||||||
// var res = mermaid.parse('digraph\n' +
|
})
|
||||||
// '{\n' +
|
|
||||||
// 'a -:> b -> c -- d -> e;\n' +
|
|
||||||
// 'a -- e;\n' +
|
|
||||||
// '}')
|
|
||||||
|
|
||||||
// expect(res).toBe(false)
|
|
||||||
// expect(global.mermaid.parseError).toHaveBeenCalled()
|
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user