-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.template', {
- setup: function () {
+ beforeEach: function () {
var abcCompiler = {
compile: function () {
return 'abc default compiler';
}
} );
- QUnit.test( 'add', 1, function ( assert ) {
+ QUnit.test( 'add', function ( assert ) {
assert.throws(
function () {
mw.template.add( 'module', 'test_templates_foo', 'hello' );
);
} );
- QUnit.test( 'compile', 1, function ( assert ) {
+ QUnit.test( 'compile', function ( assert ) {
assert.throws(
function () {
mw.template.compile( '{{foo}}', 'rainbow' );
);
} );
- QUnit.test( 'get', 4, function ( assert ) {
+ QUnit.test( 'get', function ( assert ) {
assert.strictEqual( mw.template.get( 'test.mediawiki.template', 'test_templates_foo.xyz' ), 'xyz compiler' );
assert.strictEqual( mw.template.get( 'test.mediawiki.template', 'test_templates_foo.abc' ), 'abc default compiler' );
assert.throws(
);
} );
-}( mediaWiki ) );
+}() );