From d2a807c75f7665991bb91dbcf52cc0ca99706a5e Mon Sep 17 00:00:00 2001 From: Nic Jansma Date: Thu, 2 Apr 2015 15:26:00 -0400 Subject: [PATCH] Lint fixes --- Gruntfile.js | 2 +- .../03-load-order/02-after-page-load-tag-manager.js | 6 +++--- tests/server/.eslintrc | 5 +++++ tests/server/route-delay.js | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 tests/server/.eslintrc diff --git a/Gruntfile.js b/Gruntfile.js index 4eba1e898..b17a6bdc5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -267,7 +267,7 @@ module.exports = function (grunt) { port: 4002, hostname: "localhost", middleware: function(connect, options, middlewares) { - middlewares.push(['/delay', require("./tests/server/route-delay")]); + middlewares.push(["/delay", require("./tests/server/route-delay")]); return middlewares; } }, diff --git a/tests/page-templates/03-load-order/02-after-page-load-tag-manager.js b/tests/page-templates/03-load-order/02-after-page-load-tag-manager.js index cbff57e6b..30a6a64bf 100644 --- a/tests/page-templates/03-load-order/02-after-page-load-tag-manager.js +++ b/tests/page-templates/03-load-order/02-after-page-load-tag-manager.js @@ -22,14 +22,14 @@ describe("e2e/03-load-order/02-after-page-load-tag-manager", function() { assert.operator(b["rt.end"], ">=", BOOMR.t_lstart); } }); - + it("Should have a end timestamp before the Boomerang start timestamp (if NavTiming not supported)", function() { var b = tf.lastBeacon(); if (!(window.performance && window.performance.timing)) { assert.operator(b["rt.end"], "<=", BOOMR.t_start); } }); - + it("Should have a end timestamp before now (if NavTiming not supported)", function() { var b = tf.lastBeacon(); var now = +(new Date()); @@ -37,7 +37,7 @@ describe("e2e/03-load-order/02-after-page-load-tag-manager", function() { assert.operator(b["rt.end"], "<=", now); } }); - + it("Should have a end timestamp equal to BOOMR.t_onload (if NavTiming not supported)", function() { var b = tf.lastBeacon(); if (!(window.performance && window.performance.timing)) { diff --git a/tests/server/.eslintrc b/tests/server/.eslintrc new file mode 100644 index 000000000..5e1457134 --- /dev/null +++ b/tests/server/.eslintrc @@ -0,0 +1,5 @@ +{ + "env": { + "node": true + } +} diff --git a/tests/server/route-delay.js b/tests/server/route-delay.js index 119c8ed39..8546f57d3 100644 --- a/tests/server/route-delay.js +++ b/tests/server/route-delay.js @@ -34,7 +34,7 @@ if (wwwRoot.indexOf("/") !== 0) { } module.exports = function(req, res) { - var q = require('url').parse(req.url, true)['query']; + var q = require("url").parse(req.url, true).query; var delay = q.delay; var file = q.file; @@ -55,4 +55,4 @@ module.exports = function(req, res) { fileStream.pipe(res); }); }, delay); -} +};