diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /tests/qunit/suites/resources/jquery/jquery.highlightText.test.js | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.highlightText.test.js')
-rw-r--r-- | tests/qunit/suites/resources/jquery/jquery.highlightText.test.js | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js b/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js index 4750d2b8..a94dca31 100644 --- a/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js @@ -1,12 +1,7 @@ -module( 'jquery.highlightText', QUnit.newMwEnvironment() ); +QUnit.module( 'jquery.highlightText', QUnit.newMwEnvironment() ); -test( '-- Initial check', function() { - expect(1); - ok( $.fn.highlightText, 'jQuery.fn.highlightText defined' ); -} ); - -test( 'Check', function() { - var cases = [ +QUnit.test( 'Check', function ( assert ) { + var $fixture, cases = [ { desc: 'Test 001', text: 'Blue Öyster Cult', @@ -224,16 +219,14 @@ test( 'Check', function() { expected: '<span class="highlight">بو</span>ل إيردوس' } ]; - expect(cases.length); - var $fixture; + QUnit.expect( cases.length ); - $.each(cases, function( i, item ) { - $fixture = $( '<p></p>' ).text( item.text ); - $fixture.highlightText( item.highlight ); - equals( + $.each( cases, function ( i, item ) { + $fixture = $( '<p>' ).text( item.text ).highlightText( item.highlight ); + assert.equal( $fixture.html(), - $('<p>' + item.expected + '</p>').html(), // re-parse to normalize! + $( '<p>' ).html( item.expected ).html(), // re-parse to normalize! item.desc || undefined - ); + ); } ); } ); |