);
assert.equal(
formatParse( 'external-link-plural', 2, 'http://example.org' ),
- 'Foo <a href=\"http://example.org\">two</a> things.',
+ 'Foo <a href="http://example.org">two</a> things.',
'Link is expanded inside an explicit plural form and is not escaped html'
);
assert.equal(
]
];
- $.each( testCases, function () {
+ testCases.forEach( function ( testCase ) {
var
- key = this[ 0 ],
- input = this[ 1 ],
- output = this[ 2 ];
+ key = testCase[ 0 ],
+ input = testCase[ 1 ],
+ output = testCase[ 2 ];
mw.messages.set( key, input );
assert.htmlEqual(
formatParse( key ),
]
];
- $.each( testCases, function () {
+ testCases.forEach( function ( testCase ) {
var
- key = this[ 0 ],
- input = this[ 1 ],
- output = this[ 2 ],
+ key = testCase[ 0 ],
+ input = testCase[ 1 ],
+ output = testCase[ 2 ],
paramHref = key.slice( 0, 8 ) === 'wikilink' ? 'Example' : 'http://example.com',
paramText = 'Text';
mw.messages.set( key, input );
var queue;
mw.messages.set( 'formatnum-msg', '{{formatnum:$1}}' );
mw.messages.set( 'formatnum-msg-int', '{{formatnum:$1|R}}' );
- queue = $.map( formatnumTests, function ( test ) {
+ queue = formatnumTests.map( function ( test ) {
var done = assert.async();
return function ( next, abort ) {
getMwLanguage( test.lang )