diff --git a/grunt-tasks/jshint.js b/grunt-tasks/jshint.js index ef0d0aa03..c789c9a8b 100644 --- a/grunt-tasks/jshint.js +++ b/grunt-tasks/jshint.js @@ -19,6 +19,7 @@ module.exports = function(grunt) { _: true, Backbone: true, console: true, + define: true, issueNumber: true, marked: true, moment: true, @@ -28,6 +29,9 @@ module.exports = function(grunt) { wcEvents: true } }, + tests: [ + 'tests/functional/lib/*.js' + ], beforeconcat: [ '<%= jsPath %>/lib/homepage.js', '<%= jsPath %>/lib/bugform.js', @@ -42,4 +46,4 @@ module.exports = function(grunt) { ] }); -}; \ No newline at end of file +}; diff --git a/tests/functional/lib/contributors.js b/tests/functional/lib/contributors.js index b3e47c9fc..6a18dc939 100644 --- a/tests/functional/lib/contributors.js +++ b/tests/functional/lib/contributors.js @@ -40,7 +40,7 @@ define([ .then(function (className) { assert.notEqual('is-active', className); }) - .end() + .end(); }, 'clicking section toggles it': function() { @@ -67,7 +67,7 @@ define([ .findByCssSelector('.wc-Hero-img').getAttribute('class') .then(function (className) { assert.notInclude('is-active', className); - }) + }); }, 'toggling section toggles lightbulb': function() { @@ -84,7 +84,7 @@ define([ .findByCssSelector('.wc-Hero-img').getAttribute('class') .then(function (className) { assert.notInclude('is-active', className); - }) + }); }, }); diff --git a/tests/functional/lib/index.js b/tests/functional/lib/index.js index c80553668..577498770 100644 --- a/tests/functional/lib/index.js +++ b/tests/functional/lib/index.js @@ -43,7 +43,7 @@ define([ .end() .findByCssSelector('.wc-Navbar-section--right .wc-Navbar-link').getVisibleText() .then(function (text) { - assert.equal(text, "Logout"); + assert.equal(text, 'Logout'); }) .end() .findByCssSelector('#my-issues h3').getVisibleText() @@ -51,7 +51,7 @@ define([ assert.equal(text, 'Submitted by Me'); }) .sleep(1000) - .end() + .end(); }, 'reporter addon link is shown': function () { @@ -113,7 +113,7 @@ define([ assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments'); assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date'); }) - .end() + .end(); }, 'browse issues (untriaged)': function() { @@ -149,7 +149,7 @@ define([ assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments'); assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date'); }) - .end() + .end(); }, 'browse issues (site contacted)': function() { @@ -185,7 +185,7 @@ define([ assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments'); assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date'); }) - .end() + .end(); }, 'browse issues (ready for outreach)': function() { @@ -222,7 +222,7 @@ define([ assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments'); assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date'); }) - .end() + .end(); } }); diff --git a/tests/functional/lib/issue-list.js b/tests/functional/lib/issue-list.js index 99781d111..510d6f8ab 100644 --- a/tests/functional/lib/issue-list.js +++ b/tests/functional/lib/issue-list.js @@ -56,7 +56,7 @@ define([ assert.match(text, /comments:\s\d+$/i, 'Issue should display number of comments'); assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date'); }) - .end() + .end(); }, 'PaginationControlsView tests': function() { @@ -86,7 +86,7 @@ define([ .then(function (className) { assert.include(className, 'is-disabled', 'Going back from first next click should have disabled prev button'); }) - .end() + .end(); } }); }); diff --git a/tests/functional/lib/issues.js b/tests/functional/lib/issues.js index ed5d428d0..510fc952f 100644 --- a/tests/functional/lib/issues.js +++ b/tests/functional/lib/issues.js @@ -12,7 +12,7 @@ define([ var url = function(num) { return intern.config.siteRoot + '/issues/' + num; - } + }; registerSuite({ name: 'issues', @@ -66,8 +66,8 @@ define([ .get(require.toUrl(url(999999))) .findByCssSelector('#pageerror h2').getVisibleText() .then(function (text) { - assert.include(text, "(404)", "We\'re at the 404."); - }) + assert.include(text, '(404)', 'We\'re at the 404.'); + }); } }); diff --git a/tests/functional/lib/reporting.js b/tests/functional/lib/reporting.js index 70dd5b038..5aab2476d 100644 --- a/tests/functional/lib/reporting.js +++ b/tests/functional/lib/reporting.js @@ -18,7 +18,7 @@ define([ 'submit buttons are disabled': function() { return this.remote .setFindTimeout(intern.config.wc.pageLoadTimeout) - .get(require.toUrl(url + "?open=1")) + .get(require.toUrl(url + '?open=1')) .findByCssSelector('#submitanon').getAttribute('class') .then(function (className) { assert.include(className, 'is-disabled'); @@ -27,13 +27,13 @@ define([ .findByCssSelector('#submitgithub').getAttribute('class') .then(function (className) { assert.include(className, 'is-disabled'); - }) + }); }, 'validation works': function() { return this.remote .setFindTimeout(intern.config.wc.pageLoadTimeout) - .get(require.toUrl(url + "?open=1")) + .get(require.toUrl(url + '?open=1')) .findByCssSelector('#url').click() .end() .findByCssSelector('#summary').click() @@ -66,7 +66,7 @@ define([ .findByCssSelector('#submitgithub').getAttribute('class') .then(function (className) { assert.notInclude(className, 'is-disabled'); - }) + }); }, // 'anonymous report': function () {