Created
September 15, 2014 13:06
-
-
Save he7d3r/b75b1d93c49c88412e37 to your computer and use it in GitHub Desktop.
QUnit tests for TemplateScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* QUnit tests for TemplateScript.js | |
*/ | |
/*jslint browser: true, white: true*/ | |
/*global jQuery, mediaWiki, QUnit */ | |
( function ( $, mw /* , undefined */ ) { | |
'use strict'; | |
function myTests(){ | |
function myFix( text ){ | |
return text.replace(/a/g, 'A'); | |
} | |
QUnit.module('Expressões regulares'); | |
QUnit.test('foo bar', function () { | |
QUnit.expect(1); | |
equal( | |
myFix('alguma coisa'), | |
'AlgumA coisA', | |
'Cada "a" é trocado por um "A"' | |
); | |
}); | |
} | |
mw.loader.using('jquery.qunit', myTests ); | |
}( jQuery, mediaWiki ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment