} );
// Tests that {{-transformation vs. general parsing are done as requested
- QUnit.test( 'Curly brace transformation', 14, function ( assert ) {
+ QUnit.test( 'Curly brace transformation', 16, function ( assert ) {
var oldUserLang = mw.config.get( 'wgUserLanguage' );
assertBothModes( assert, ['gender-msg', 'Bob', 'male'], 'Bob: blue', 'gender is resolved' );
'Foo <a href="http://example.com">bar</a>',
'External link message processed when format is \'parse\''
);
+ assert.htmlEqual(
+ formatParse( 'external-link-replace', $( '<i>' ) ),
+ 'Foo <i>bar</i>',
+ 'External link message processed as jQuery object when format is \'parse\''
+ );
+ assert.htmlEqual(
+ formatParse( 'external-link-replace', function () {} ),
+ 'Foo <a href="#">bar</a>',
+ 'External link message processed as function when format is \'parse\''
+ );
mw.config.set( 'wgUserLanguage', oldUserLang );
} );