import test = require('tape'); import markdownIt = require('markdown-it'); import plugin = require('../src/markdown-it-plugin'); declare global { interface String { workaround(): string; } } String.prototype.workaround = function (this : string) { var s = this; // See https://github.com/rlidwka/markdown-it-regexp/issues/4 return `
${s}
\n`; }; test('markdown-it plugin test', t => { const md = markdownIt(); md.use(plugin); t.plan(3); t.equal(md.render(':fa-ban:'), ``.workaround()); t.equal(md.render(':fa-ban---camera--lg:'), ` `.workaround()); t.equal(md.render(':fa-ban--90--v--danger-----camera--lg--left--180--h--success-----x:'), ` `.workaround()); });