(source, expected, options = {})
| 82 | const tokenizer = new Markdoc.Tokenizer({ allowComments: true }); |
| 83 | |
| 84 | function check(source, expected, options = {}) { |
| 85 | const a = expected?.trimStart(); |
| 86 | const b = format(Markdoc.parse(tokenizer.tokenize(source)), options); |
| 87 | // console.log(a, b); |
| 88 | const d = diff(a, b); |
| 89 | if (d && d.includes('Compared values have no visual difference.')) return; |
| 90 | throw d; |
| 91 | } |
| 92 | |
| 93 | function stable(source, options?) { |
| 94 | return check(source, source, options); |
no test coverage detected
searching dependent graphs…