jenkins-bot has submitted this change and it was merged.
Change subject: build: Bump devDependencies to latest
......................................................................
build: Bump devDependencies to latest
grunt-contrib-clean 0.7.0 → 1.0.0
grunt-contrib-concat 0.5.1 → 1.0.0
grunt-contrib-copy 0.8.2 → 1.0.0
grunt-contrib-csslint 0.5.0 → 1.0.0
grunt-contrib-jshint 0.11.3 → 1.0.0
grunt-contrib-less 1.1.0 → 1.2.0
grunt-contrib-watch 0.6.1 → 1.0.0
grunt-image 1.2.2 → 1.3.0
grunt-jscs 2.6.0 → 2.8.0
karma-coverage 0.5.3 → 0.5.5
karma-qunit 0.1.5 → 0.1.9
karma 0.13.19 → 0.13.22
qunitjs 1.18.0 → 1.22.0
Holding back grunt-contrib-uglify at 0.11.0 and grunt-contrib-cssmin at 0.14.0
for now, as newer versions require node 0.12.x and CI is still runing node
0.10.x.
Change-Id: Ice8f22aecbc65d56fb80c5a12f509c074cd80b8b
---
M .jshintrc
M package.json
M tests/core.test.js
3 files changed, 54 insertions(+), 47 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.jshintrc b/.jshintrc
index 04c8bbc..e658ba1 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -3,13 +3,17 @@
"bitwise": true,
"eqeqeq": true,
"freeze": true,
- "latedef": true,
+ "latedef": "nofunc",
+ "futurehostile": true,
"noarg": true,
"nonew": true,
"undef": true,
"unused": true,
+
"strict": false,
+ // Relaxing
+
// Environment
"browser": true,
"jquery": true,
diff --git a/package.json b/package.json
index 65881f0..a7c5318 100644
--- a/package.json
+++ b/package.json
@@ -28,21 +28,21 @@
"devDependencies": {
"grunt-banana-checker": "0.4.0",
"grunt-cli": "0.1.13",
- "grunt-contrib-clean": "0.7.0",
- "grunt-contrib-concat": "0.5.1",
- "grunt-contrib-copy": "0.8.2",
- "grunt-contrib-csslint": "0.5.0",
+ "grunt-contrib-clean": "1.0.0",
+ "grunt-contrib-concat": "1.0.0",
+ "grunt-contrib-copy": "1.0.0",
+ "grunt-contrib-csslint": "1.0.0",
"grunt-contrib-cssmin": "0.14.0",
- "grunt-contrib-jshint": "0.11.3",
- "grunt-contrib-less": "1.1.0",
+ "grunt-contrib-jshint": "1.0.0",
+ "grunt-contrib-less": "1.2.0",
"grunt-contrib-uglify": "0.11.0",
- "grunt-contrib-watch": "0.6.1",
+ "grunt-contrib-watch": "1.0.0",
"grunt-csscomb": "3.1.0",
"grunt-cssjanus": "0.2.4",
"grunt-exec": "0.4.6",
"grunt-file-exists": "0.1.3",
- "grunt-image": "1.2.2",
- "grunt-jscs": "2.6.0",
+ "grunt-image": "1.3.0",
+ "grunt-jscs": "2.8.0",
"grunt-jsonlint": "1.0.7",
"grunt-karma": "0.12.1",
"grunt-promise-q": "0.1.1",
@@ -50,11 +50,11 @@
"grunt-tyops": "0.1.0",
"grunt": "0.4.5",
"karma-chrome-launcher": "0.2.2",
- "karma-coverage": "0.5.3",
+ "karma-coverage": "0.5.5",
"karma-firefox-launcher": "0.1.7",
- "karma-qunit": "0.1.5",
- "karma": "0.13.19",
+ "karma-qunit": "0.1.9",
+ "karma": "0.13.22",
"q": "1.4.1",
- "qunitjs": "1.18.0"
+ "qunitjs": "1.22.0"
}
}
diff --git a/tests/core.test.js b/tests/core.test.js
index c26f207..4fee69f 100644
--- a/tests/core.test.js
+++ b/tests/core.test.js
@@ -96,47 +96,19 @@
QUnit.asyncTest( 'debounce', 4, function ( assert ) {
var
+ cases,
+ funCalled,
+ setTimeoutCalled,
+ casesDone = 0,
+
realSetTimeout = window.setTimeout,
ourSetTimeout = function () {
setTimeoutCalled++;
return realSetTimeout.apply( window, arguments );
},
- funCalled,
- setTimeoutCalled,
fun = function () {
funCalled++;
},
- cases = [
- function () {
- var fun50 = OO.ui.debounce( fun, 50 );
- funCalled = 0;
- setTimeoutCalled = 0;
- window.setTimeout = ourSetTimeout;
- fun50();
- fun50();
- window.setTimeout = realSetTimeout;
- setTimeout( function () {
- assert.strictEqual( setTimeoutCalled,
2, 'wait=50: setTimeout was called twice' );
- assert.strictEqual( funCalled, 1,
'wait=50: debounced function was executed once' );
- maybeFinishTest();
- }, 100 );
- },
- function () {
- var fun0 = OO.ui.debounce( fun );
- funCalled = 0;
- setTimeoutCalled = 0;
- window.setTimeout = ourSetTimeout;
- fun0();
- fun0();
- window.setTimeout = realSetTimeout;
- setTimeout( function () {
- assert.strictEqual( setTimeoutCalled,
1, 'wait=0: setTimeout was called once' );
- assert.strictEqual( funCalled, 1,
'wait=0: debounced function was executed once' );
- maybeFinishTest();
- }, 100 );
- }
- ],
- casesDone = 0,
maybeFinishTest = function () {
if ( casesDone === 2 ) {
QUnit.start();
@@ -146,5 +118,36 @@
}
};
+ cases = [
+ function () {
+ var fun50 = OO.ui.debounce( fun, 50 );
+ funCalled = 0;
+ setTimeoutCalled = 0;
+ window.setTimeout = ourSetTimeout;
+ fun50();
+ fun50();
+ window.setTimeout = realSetTimeout;
+ setTimeout( function () {
+ assert.strictEqual( setTimeoutCalled, 2,
'wait=50: setTimeout was called twice' );
+ assert.strictEqual( funCalled, 1, 'wait=50:
debounced function was executed once' );
+ maybeFinishTest();
+ }, 100 );
+ },
+ function () {
+ var fun0 = OO.ui.debounce( fun );
+ funCalled = 0;
+ setTimeoutCalled = 0;
+ window.setTimeout = ourSetTimeout;
+ fun0();
+ fun0();
+ window.setTimeout = realSetTimeout;
+ setTimeout( function () {
+ assert.strictEqual( setTimeoutCalled, 1,
'wait=0: setTimeout was called once' );
+ assert.strictEqual( funCalled, 1, 'wait=0:
debounced function was executed once' );
+ maybeFinishTest();
+ }, 100 );
+ }
+ ];
+
maybeFinishTest();
} );
--
To view, visit https://gerrit.wikimedia.org/r/277743
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice8f22aecbc65d56fb80c5a12f509c074cd80b8b
Gerrit-PatchSet: 11
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits