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