diff --git a/test/async_test.js b/test/async_test.js index 91dccba..001b2c1 100644 --- a/test/async_test.js +++ b/test/async_test.js @@ -14,9 +14,10 @@ describe("async rendering", function(){ }); helpers.createServer(8070, function(req, res){ + var data; switch(req.url) { case "/bar": - var data = [ { "a": "a" }, { "b": "b" } ]; + data = [ { "a": "a" }, { "b": "b" } ]; break; default: throw new Error("No route for " + req.url); diff --git a/test/auth-cookie-failed-domain_test.js b/test/auth-cookie-failed-domain_test.js index db0be16..c0f4dbd 100644 --- a/test/auth-cookie-failed-domain_test.js +++ b/test/auth-cookie-failed-domain_test.js @@ -24,10 +24,11 @@ describe("auth cookies - failed domain", function() { }); helpers.createServer(8070, function(req, res){ + var data; authHeader = req.headers.authorization; switch(req.url) { case "/api/list": - var data = [1,2,3,4,5]; + data = [1,2,3,4,5]; break; default: throw new Error("No route for " + req.url); diff --git a/test/auth-cookie_test.js b/test/auth-cookie_test.js index a78a867..f93f0ff 100644 --- a/test/auth-cookie_test.js +++ b/test/auth-cookie_test.js @@ -25,10 +25,11 @@ describe("auth cookies", function() { }); helpers.createServer(8070, function(req, res){ + var data; authHeader = req.headers.authorization; switch(req.url) { case "/api/list": - var data = [1,2,3,4,5]; + data = [1,2,3,4,5]; break; default: throw new Error("No route for " + req.url); diff --git a/test/incremental_prog_test.js b/test/incremental_prog_test.js index 5424b8b..a82a6cd 100644 --- a/test/incremental_prog_test.js +++ b/test/incremental_prog_test.js @@ -9,9 +9,10 @@ describe("Incremental rendering", function(){ before(function(done){ helpers.createServer(8070, function(req, res){ + var data; switch(req.url) { case "/bar": - var data = [ { "a": "a" }, { "b": "b" } ]; + data = [ { "a": "a" }, { "b": "b" } ]; break; default: throw new Error("No route for " + req.url); diff --git a/test/incremental_test.js b/test/incremental_test.js index 8e7b5f9..4209aea 100644 --- a/test/incremental_test.js +++ b/test/incremental_test.js @@ -12,9 +12,10 @@ describe("Incremental rendering", function(){ before(function(done){ helpers.createServer(8070, function(req, res){ + var data; switch(req.url) { case "/bar": - var data = [ { "a": "a" }, { "b": "b" } ]; + data = [ { "a": "a" }, { "b": "b" } ]; break; default: throw new Error("No route for " + req.url); diff --git a/test/leak_test.js b/test/leak_test.js index 8097dce..b8cdb6a 100644 --- a/test/leak_test.js +++ b/test/leak_test.js @@ -10,9 +10,10 @@ describe("Memory leaks", function(){ before(function(done){ helpers.createServer(8070, function(req, res){ + var data; switch(req.url) { case "/bar": - var data = [ { "a": "a" }, { "b": "b" } ]; + data = [ { "a": "a" }, { "b": "b" } ]; break; default: throw new Error("No route for " + req.url); diff --git a/test/xhr_test.js b/test/xhr_test.js index 1d9c965..f50d456 100644 --- a/test/xhr_test.js +++ b/test/xhr_test.js @@ -16,9 +16,10 @@ describe("xhr async rendering", function() { }); helpers.createServer(8070, function(req, res){ + var data; switch(req.url) { case "/api/list": - var data = [1,2,3,4,5]; + data = [1,2,3,4,5]; break; default: throw new Error("No route for " + req.url);