From dd366f35a88583fcb198b7eb102c9a3f57972ddf Mon Sep 17 00:00:00 2001 From: rejas Date: Sun, 21 Mar 2021 17:20:31 +0100 Subject: [PATCH] Use es6 notation in test configs --- tests/configs/empty_ipWhiteList.js | 3 +-- tests/configs/env.js | 3 +-- tests/configs/modules/calendar/auth-default.js | 3 +-- tests/configs/modules/calendar/basic-auth.js | 3 +-- tests/configs/modules/calendar/changed-port.js | 3 +-- tests/configs/modules/calendar/default.js | 3 +-- tests/configs/modules/calendar/fail-basic-auth.js | 3 +-- tests/configs/modules/calendar/old-basic-auth.js | 3 +-- tests/configs/modules/display.js | 2 +- tests/configs/modules/helloworld/helloworld.js | 3 +-- tests/configs/modules/positions.js | 9 ++++----- tests/configs/noIpWhiteList.js | 3 +-- tests/configs/port_8090.js | 3 +-- tests/configs/without_modules.js | 3 +-- 14 files changed, 17 insertions(+), 30 deletions(-) diff --git a/tests/configs/empty_ipWhiteList.js b/tests/configs/empty_ipWhiteList.js index b2369c46..45728c71 100644 --- a/tests/configs/empty_ipWhiteList.js +++ b/tests/configs/empty_ipWhiteList.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: [], diff --git a/tests/configs/env.js b/tests/configs/env.js index d59f01a9..99bd6b4e 100644 --- a/tests/configs/env.js +++ b/tests/configs/env.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/calendar/auth-default.js b/tests/configs/modules/calendar/auth-default.js index dd65c53e..053c18ff 100644 --- a/tests/configs/modules/calendar/auth-default.js +++ b/tests/configs/modules/calendar/auth-default.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/calendar/basic-auth.js b/tests/configs/modules/calendar/basic-auth.js index 8937b2a3..c34998b8 100644 --- a/tests/configs/modules/calendar/basic-auth.js +++ b/tests/configs/modules/calendar/basic-auth.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/calendar/changed-port.js b/tests/configs/modules/calendar/changed-port.js index fa0f7ae7..a7e3b34a 100644 --- a/tests/configs/modules/calendar/changed-port.js +++ b/tests/configs/modules/calendar/changed-port.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/calendar/default.js b/tests/configs/modules/calendar/default.js index 86f81a36..901a6667 100644 --- a/tests/configs/modules/calendar/default.js +++ b/tests/configs/modules/calendar/default.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/calendar/fail-basic-auth.js b/tests/configs/modules/calendar/fail-basic-auth.js index 7ccb8bce..c48d2471 100644 --- a/tests/configs/modules/calendar/fail-basic-auth.js +++ b/tests/configs/modules/calendar/fail-basic-auth.js @@ -5,8 +5,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/calendar/old-basic-auth.js b/tests/configs/modules/calendar/old-basic-auth.js index fa7b70f3..7d0a146b 100644 --- a/tests/configs/modules/calendar/old-basic-auth.js +++ b/tests/configs/modules/calendar/old-basic-auth.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/display.js b/tests/configs/modules/display.js index bf2ae261..547bc12b 100644 --- a/tests/configs/modules/display.js +++ b/tests/configs/modules/display.js @@ -2,7 +2,7 @@ * * MIT Licensed. */ -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/helloworld/helloworld.js b/tests/configs/modules/helloworld/helloworld.js index b741d5ed..c0e00458 100644 --- a/tests/configs/modules/helloworld/helloworld.js +++ b/tests/configs/modules/helloworld/helloworld.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/modules/positions.js b/tests/configs/modules/positions.js index 24eed5e2..c6b2bf68 100644 --- a/tests/configs/modules/positions.js +++ b/tests/configs/modules/positions.js @@ -5,8 +5,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], @@ -23,9 +22,9 @@ var config = { modules: // Using exotic content. This is why don't accept go to JSON configuration file (function () { - var positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "bottom_bar", "fullscreen_above", "fullscreen_below"]; - var modules = Array(); - for (var idx in positions) { + let positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "bottom_bar", "fullscreen_above", "fullscreen_below"]; + let modules = Array(); + for (let idx in positions) { modules.push({ module: "helloworld", position: positions[idx], diff --git a/tests/configs/noIpWhiteList.js b/tests/configs/noIpWhiteList.js index 3bc2ed31..28369bea 100644 --- a/tests/configs/noIpWhiteList.js +++ b/tests/configs/noIpWhiteList.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["x.x.x.x"], diff --git a/tests/configs/port_8090.js b/tests/configs/port_8090.js index 91ddee50..99386dd2 100644 --- a/tests/configs/port_8090.js +++ b/tests/configs/port_8090.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8090, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/tests/configs/without_modules.js b/tests/configs/without_modules.js index 18e3ce80..8703374c 100644 --- a/tests/configs/without_modules.js +++ b/tests/configs/without_modules.js @@ -3,8 +3,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ - -var config = { +let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.10.1"],