Merge "Remove not used private member variable mParserWarnings from OutputPage"
[mediawiki.git] / tests / qunit / suites / resources / mediawiki.api / mediawiki.api.parse.test.js
blobcd0db7c965ec795819381ae7b8395c2c179697ee
1 ( function ( mw ) {
2 QUnit.module( 'mediawiki.api.parse', QUnit.newMwEnvironment( {
3 setup: function () {
4 this.server = this.sandbox.useFakeServer();
6 } ) );
8 QUnit.test( 'Hello world', function ( assert ) {
9 QUnit.expect( 1 );
11 var api = new mw.Api();
13 api.parse( '\'\'\'Hello world\'\'\'' ).done( function ( html ) {
14 assert.equal( html, '<p><b>Hello world</b></p>' );
15 } );
17 this.server.respondWith( /action=parse.*&text='''Hello\+world'''/, function ( request ) {
18 request.respond( 200, { 'Content-Type': 'application/json' },
19 '{ "parse": { "text": { "*": "<p><b>Hello world</b></p>" } } }'
21 } );
23 this.server.respond();
24 } );
25 }( mediaWiki ) );