Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should throw if exception during renderer occured', () => {
sandbox.stub(MarkdownIt.prototype, 'render')
.throws(new Error('weird render error'));
expect(() => mdRenderer.render('# Header')).to.throw(/weird render error/);
});