diff --git a/tests/configs/modules/alert/default.js b/tests/configs/modules/alert/default.js index 0713079b..e43c427d 100644 --- a/tests/configs/modules/alert/default.js +++ b/tests/configs/modules/alert/default.js @@ -3,7 +3,9 @@ * By rejas * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "alert", @@ -13,9 +15,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/auth-default.js b/tests/configs/modules/calendar/auth-default.js index 0bc6bc78..af1074bf 100644 --- a/tests/configs/modules/calendar/auth-default.js +++ b/tests/configs/modules/calendar/auth-default.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -24,9 +26,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/basic-auth.js b/tests/configs/modules/calendar/basic-auth.js index 4243a237..23de5d3f 100644 --- a/tests/configs/modules/calendar/basic-auth.js +++ b/tests/configs/modules/calendar/basic-auth.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -25,9 +27,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/changed-port.js b/tests/configs/modules/calendar/changed-port.js index 02f6d385..e181dbdf 100644 --- a/tests/configs/modules/calendar/changed-port.js +++ b/tests/configs/modules/calendar/changed-port.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -24,9 +26,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/custom.js b/tests/configs/modules/calendar/custom.js index 7e34bddd..353de3c8 100644 --- a/tests/configs/modules/calendar/custom.js +++ b/tests/configs/modules/calendar/custom.js @@ -3,7 +3,9 @@ * By Rejas * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -24,9 +26,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/default.js b/tests/configs/modules/calendar/default.js index a532dd8d..5e75513f 100644 --- a/tests/configs/modules/calendar/default.js +++ b/tests/configs/modules/calendar/default.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -20,9 +22,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/fail-basic-auth.js b/tests/configs/modules/calendar/fail-basic-auth.js index 17427e63..92f36827 100644 --- a/tests/configs/modules/calendar/fail-basic-auth.js +++ b/tests/configs/modules/calendar/fail-basic-auth.js @@ -5,7 +5,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -27,9 +29,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/old-basic-auth.js b/tests/configs/modules/calendar/old-basic-auth.js index 7ac4f930..5611245d 100644 --- a/tests/configs/modules/calendar/old-basic-auth.js +++ b/tests/configs/modules/calendar/old-basic-auth.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -22,9 +24,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/calendar/recurring.js b/tests/configs/modules/calendar/recurring.js index 04691813..5f3fedc0 100644 --- a/tests/configs/modules/calendar/recurring.js +++ b/tests/configs/modules/calendar/recurring.js @@ -3,7 +3,9 @@ * By Rejas * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -21,9 +23,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/clock_12hr.js b/tests/configs/modules/clock/clock_12hr.js index 016a10a4..3f7ea748 100644 --- a/tests/configs/modules/clock/clock_12hr.js +++ b/tests/configs/modules/clock/clock_12hr.js @@ -3,7 +3,9 @@ * By Sergey Morozov * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -12,9 +14,7 @@ let config = { position: "middle_center" } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/clock_24hr.js b/tests/configs/modules/clock/clock_24hr.js index 899d1e0a..77a0948e 100644 --- a/tests/configs/modules/clock/clock_24hr.js +++ b/tests/configs/modules/clock/clock_24hr.js @@ -3,16 +3,16 @@ * By Sergey Morozov * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "clock", position: "middle_center" } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/clock_analog.js b/tests/configs/modules/clock/clock_analog.js index 54295b4f..c9f13aae 100644 --- a/tests/configs/modules/clock/clock_analog.js +++ b/tests/configs/modules/clock/clock_analog.js @@ -2,7 +2,9 @@ * * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "clock", @@ -13,9 +15,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/clock_displaySeconds_false.js b/tests/configs/modules/clock/clock_displaySeconds_false.js index b39c0322..dd7eee9b 100644 --- a/tests/configs/modules/clock/clock_displaySeconds_false.js +++ b/tests/configs/modules/clock/clock_displaySeconds_false.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -15,9 +17,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/clock_showPeriodUpper.js b/tests/configs/modules/clock/clock_showPeriodUpper.js index a18c5b56..98acafce 100644 --- a/tests/configs/modules/clock/clock_showPeriodUpper.js +++ b/tests/configs/modules/clock/clock_showPeriodUpper.js @@ -3,7 +3,9 @@ * By Sergey Morozov * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -15,9 +17,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/clock_showWeek.js b/tests/configs/modules/clock/clock_showWeek.js index 63ba437f..182d5d1e 100644 --- a/tests/configs/modules/clock/clock_showWeek.js +++ b/tests/configs/modules/clock/clock_showWeek.js @@ -3,7 +3,9 @@ * By Johan Hammar * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -15,9 +17,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/es/clock_12hr.js b/tests/configs/modules/clock/es/clock_12hr.js index d1c1d0e5..7313a814 100644 --- a/tests/configs/modules/clock/es/clock_12hr.js +++ b/tests/configs/modules/clock/es/clock_12hr.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../../default.js') + +const config = configFacory({ language: "es", timeFormat: 12, @@ -13,9 +15,7 @@ let config = { position: "middle_center" } ] -}; - -config = Object.assign(require("../../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/es/clock_24hr.js b/tests/configs/modules/clock/es/clock_24hr.js index 41d3e60b..715a47ba 100644 --- a/tests/configs/modules/clock/es/clock_24hr.js +++ b/tests/configs/modules/clock/es/clock_24hr.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../../default.js') + +const config = configFacory({ language: "es", modules: [ @@ -12,9 +14,7 @@ let config = { position: "middle_center" } ] -}; - -config = Object.assign(require("../../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/es/clock_showPeriodUpper.js b/tests/configs/modules/clock/es/clock_showPeriodUpper.js index 6f8fb1d2..2bff573b 100644 --- a/tests/configs/modules/clock/es/clock_showPeriodUpper.js +++ b/tests/configs/modules/clock/es/clock_showPeriodUpper.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../../default.js') + +const config = configFacory({ language: "es", timeFormat: 12, @@ -16,9 +18,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/clock/es/clock_showWeek.js b/tests/configs/modules/clock/es/clock_showWeek.js index dc90b1ed..bcb00b49 100644 --- a/tests/configs/modules/clock/es/clock_showWeek.js +++ b/tests/configs/modules/clock/es/clock_showWeek.js @@ -4,7 +4,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../../default.js') + +const config = configFacory({ language: "es", timeFormat: 12, @@ -17,9 +19,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/compliments/compliments_anytime.js b/tests/configs/modules/compliments/compliments_anytime.js index acf5b684..5fb90091 100644 --- a/tests/configs/modules/compliments/compliments_anytime.js +++ b/tests/configs/modules/compliments/compliments_anytime.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -20,9 +22,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/compliments/compliments_date.js b/tests/configs/modules/compliments/compliments_date.js index 38ec2b7c..07ce74fe 100644 --- a/tests/configs/modules/compliments/compliments_date.js +++ b/tests/configs/modules/compliments/compliments_date.js @@ -3,7 +3,9 @@ * By Rejas * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -21,9 +23,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/compliments/compliments_only_anytime.js b/tests/configs/modules/compliments/compliments_only_anytime.js index 47d24fb5..8ff8c76d 100644 --- a/tests/configs/modules/compliments/compliments_only_anytime.js +++ b/tests/configs/modules/compliments/compliments_only_anytime.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -17,9 +19,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/compliments/compliments_parts_day.js b/tests/configs/modules/compliments/compliments_parts_day.js index 2d475c01..c4685ea7 100644 --- a/tests/configs/modules/compliments/compliments_parts_day.js +++ b/tests/configs/modules/compliments/compliments_parts_day.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -19,9 +21,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/display.js b/tests/configs/modules/display.js index 24556659..176c2d2a 100644 --- a/tests/configs/modules/display.js +++ b/tests/configs/modules/display.js @@ -3,7 +3,9 @@ * By Rejas * MIT Licensed. */ -let config = { +const configFactory = require('../default.js') + +let config = configFacory({ modules: [ { module: "helloworld", @@ -21,9 +23,8 @@ let config = { } } ] -}; +}); -config = Object.assign(require("../default.js"), config); config.electronOptions.fullscreen = false; config.electronOptions.width = 800; config.electronOptions.height = 600; diff --git a/tests/configs/modules/helloworld/helloworld.js b/tests/configs/modules/helloworld/helloworld.js index 126cadca..770daf39 100644 --- a/tests/configs/modules/helloworld/helloworld.js +++ b/tests/configs/modules/helloworld/helloworld.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "helloworld", @@ -13,9 +15,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/helloworld/helloworld_default.js b/tests/configs/modules/helloworld/helloworld_default.js index e091c796..cbe15e80 100644 --- a/tests/configs/modules/helloworld/helloworld_default.js +++ b/tests/configs/modules/helloworld/helloworld_default.js @@ -3,16 +3,16 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "helloworld", position: "bottom_bar" } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/newsfeed/default.js b/tests/configs/modules/newsfeed/default.js index 649bbcdd..8faf9b5e 100644 --- a/tests/configs/modules/newsfeed/default.js +++ b/tests/configs/modules/newsfeed/default.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -20,9 +22,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/newsfeed/incorrect_url.js b/tests/configs/modules/newsfeed/incorrect_url.js index 242ad992..c81729e6 100644 --- a/tests/configs/modules/newsfeed/incorrect_url.js +++ b/tests/configs/modules/newsfeed/incorrect_url.js @@ -2,7 +2,9 @@ * * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -19,9 +21,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/newsfeed/prohibited_words.js b/tests/configs/modules/newsfeed/prohibited_words.js index 15ac8dd7..ca567d35 100644 --- a/tests/configs/modules/newsfeed/prohibited_words.js +++ b/tests/configs/modules/newsfeed/prohibited_words.js @@ -2,7 +2,9 @@ * * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -21,9 +23,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/positions.js b/tests/configs/modules/positions.js index d3229532..1794a1fb 100644 --- a/tests/configs/modules/positions.js +++ b/tests/configs/modules/positions.js @@ -3,7 +3,9 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { +const configFactory = require('../default.js') + +const config = configFacory({ modules: // Using exotic content. This is why don't accept go to JSON configuration file (function () { @@ -20,9 +22,7 @@ let config = { } return modules; })() -}; - -config = Object.assign(require("../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/currentweather_compliments.js b/tests/configs/modules/weather/currentweather_compliments.js index 3b47ea65..fb8929ca 100644 --- a/tests/configs/modules/weather/currentweather_compliments.js +++ b/tests/configs/modules/weather/currentweather_compliments.js @@ -3,7 +3,9 @@ * By rejas https://github.com/rejas * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "compliments", @@ -25,9 +27,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/currentweather_default.js b/tests/configs/modules/weather/currentweather_default.js index 7e9859c7..d753d28f 100644 --- a/tests/configs/modules/weather/currentweather_default.js +++ b/tests/configs/modules/weather/currentweather_default.js @@ -3,7 +3,9 @@ * By fewieden https://github.com/fewieden * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -17,9 +19,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/currentweather_options.js b/tests/configs/modules/weather/currentweather_options.js index 30f14e3b..7af1a9f3 100644 --- a/tests/configs/modules/weather/currentweather_options.js +++ b/tests/configs/modules/weather/currentweather_options.js @@ -3,7 +3,9 @@ * By fewieden https://github.com/fewieden * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ modules: [ { module: "weather", @@ -21,9 +23,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/currentweather_units.js b/tests/configs/modules/weather/currentweather_units.js index e6a487a7..77792cb6 100644 --- a/tests/configs/modules/weather/currentweather_units.js +++ b/tests/configs/modules/weather/currentweather_units.js @@ -3,7 +3,9 @@ * By fewieden https://github.com/fewieden * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ units: "imperial", modules: [ @@ -19,9 +21,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/forecastweather_default.js b/tests/configs/modules/weather/forecastweather_default.js index c9385515..ff9769a9 100644 --- a/tests/configs/modules/weather/forecastweather_default.js +++ b/tests/configs/modules/weather/forecastweather_default.js @@ -3,7 +3,9 @@ * By fewieden https://github.com/fewieden * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -19,9 +21,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/forecastweather_options.js b/tests/configs/modules/weather/forecastweather_options.js index ad6883e9..9952e9c5 100644 --- a/tests/configs/modules/weather/forecastweather_options.js +++ b/tests/configs/modules/weather/forecastweather_options.js @@ -3,7 +3,9 @@ * By fewieden https://github.com/fewieden * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ timeFormat: 12, modules: [ @@ -22,9 +24,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/modules/weather/forecastweather_units.js b/tests/configs/modules/weather/forecastweather_units.js index af5c8f09..e17e1a20 100644 --- a/tests/configs/modules/weather/forecastweather_units.js +++ b/tests/configs/modules/weather/forecastweather_units.js @@ -3,7 +3,9 @@ * By rejas * MIT Licensed. */ -let config = { +const configFactory = require('../../default.js') + +const config = configFacory({ units: "imperial", modules: [ @@ -20,9 +22,7 @@ let config = { } } ] -}; - -config = Object.assign(require("../../default.js"), config); +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { diff --git a/tests/configs/without_modules.js b/tests/configs/without_modules.js index 6e199b00..a9eec34a 100644 --- a/tests/configs/without_modules.js +++ b/tests/configs/without_modules.js @@ -3,12 +3,11 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ -let config = { - ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.10.1"] -}; +const configFactory = require('./default.js') -config = Object.assign(require("./default.js"), config); -delete config.modules; +const config = configFacory({ + ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.10.1"] +}); /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {