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); -} +};