How to use the markdown-it.prototype function in markdown-it

To help you get started, we’ve selected a few markdown-it examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rakutentech / docpub / test / unit / md-renderer / index.js View on Github external
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/);
        });