Update test files

- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.

Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
This commit is contained in:
Siebrand Mazeland
2016-02-15 08:41:22 +01:00
committed by Nikerabbit
parent faa5c06bda
commit 6a2b2e0bba
19 changed files with 137 additions and 73 deletions

View File

@@ -1,4 +1,4 @@
/**
/*!
* QUnit tests for ULS.
*
* Copyright (C) 2012 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris,
@@ -38,17 +38,18 @@
} );
QUnit.test( 'User preferences', function ( assert ) {
var prefName, prefs, prefsToSave, readPrefs;
QUnit.expect( 2 );
// 'gofanim' means "fonts" in Hebrew.
// Here it's used as a meaningless word, to test
// the preferences without changing anything useful.
var prefName = 'gofanim',
prefs = mw.uls.preferences(),
prefsToSave = {},
readPrefs;
prefName = 'gofanim';
prefs = mw.uls.preferences();
prefsToSave = {};
prefsToSave[prefName] = {
prefsToSave[ prefName ] = {
fonts: {
qqy: 'Megafont'
}
@@ -58,7 +59,7 @@
readPrefs = prefs.get( prefName );
assert.strictEqual(
readPrefs[prefName].fonts.qqy,
readPrefs[ prefName ].fonts.qqy,
'Megafont',
'Correct value for the font name'
);
@@ -87,8 +88,8 @@
languagesInPH = mw.uls.getFrequentLanguageList( 'PH' );
for ( i = 0; i < languagesInPH.length; i++ ) {
if ( $.uls.data.isRedirect( languagesInPH[i] ) === 'tl' ||
languagesInPH[i] === 'tl'
if ( $.uls.data.isRedirect( languagesInPH[ i ] ) === 'tl' ||
languagesInPH[ i ] === 'tl'
) {
foundTagalog = true;