Content deleted Content added
. |
|||
Line 1,012:
};
*/
$('<div>')
return true; // mw.loader.using('jquery.qunit');
}
Line 1,055 ⟶ 1,057:
) {
$.when(setupForTesting(), $.ready()).then(function() {
mw.loader.load('https://code.jquery.com/qunit/qunit-2.6.2.css', 'text/css');
$.getScript('https://code.jquery.com/qunit/qunit-2.6.2.js', function() {
▲ .attr('id', 'qunit')
▲ .insertBefore('#firstHeading');
QUnit.module('Get parameters from a template');
QUnit.test('Single unnamed param', function(assert) {
Line 1,100 ⟶ 1,085:
assert.deepEqual(params1, expected1, 'unspaced');
assert.deepEqual(params2, expected2, 'spaced');
});
QUnit.test('Two unnamed params', function(assert) {
var params1 = getTemplateParameters('|one|two');
Line 1,143 ⟶ 1,127:
assert.deepEqual(params1, expected1, 'unspaced');
assert.deepEqual(params2, expected2, 'spaced');
});
QUnit.test('Single named param', function(assert) {
var params1 = getTemplateParameters('|a=apple');
Line 1,750 ⟶ 1,733:
'==Licensing==\n{{Non-free video game cover|Platform1|Platform2}}';
assert.equal(description, expected, 'Two platforms');
});
}); // end of "get script QUnit"
}); // end of "when set up for testing" callback
|