Files
recentrunes/test.js

14 lines
541 B
JavaScript
Raw Normal View History

2014-06-27 23:07:33 -07:00
QUnit.test('Simple', function(assert) {
assert.expect(1);
2014-06-26 22:48:03 -07:00
var context = new rr.Context(mediawiki,
"=== Heading ===\n\
2014-05-20 16:40:35 -07:00
This is a wiki doc.\n\
2014-06-26 22:48:03 -07:00
How about some '''bold and <i>bold italic</i>'''.\n\
I would also love some <nowiki>nowiki <b>foo</b></nowiki>");
var iterable = context.rules['wikidoc'].match(context);
2014-06-27 23:07:33 -07:00
assert.equal(iterable.next().value.nodes[0].innerHTML,
"<h3>Heading</h3>This is a wiki doc.\n\
How about some <b>bold and &lt;i&gt;bold italic&lt;/i&gt;</b>.\n\
I would also love some nowiki &lt;b&gt;foo&lt;/b&gt;");
2014-05-20 12:49:30 -07:00
});