From 76ff95b33e3170037f3d63e3eeb7b38d84726dd1 Mon Sep 17 00:00:00 2001 From: sam detweiler Date: Fri, 25 Oct 2024 13:37:33 -0500 Subject: [PATCH] cleanup testcase with hard coded Date, #3597 --- CHANGELOG.md | 1 + tests/configs/modules/calendar/exdate_la_at_midnight_dst.js | 4 ---- tests/configs/modules/calendar/exdate_la_at_midnight_std.js | 4 ---- tests/configs/modules/calendar/exdate_la_before_midnight.js | 4 ---- tests/configs/modules/calendar/exdate_syd_at_midnight_dst.js | 4 ---- tests/configs/modules/calendar/exdate_syd_at_midnight_std.js | 4 ---- tests/configs/modules/calendar/exdate_syd_before_midnight.js | 4 ---- tests/configs/modules/calendar/rrule_until.js | 4 ---- tests/configs/modules/calendar/sliceMultiDayEvents.js | 4 ---- 9 files changed, 1 insertion(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95c7d112c2..d50d7d153d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ _This release is scheduled to be released on 2025-01-01._ - [core] Fix loading node_helper of modules: avoid black screen, display errors and continue loading with next module (#3578) - [weather] changed default value for weatherEndpoint of provider openweathermap to "/onecall" (#3574) - [tests] fix electron tests with mock dates, the mock on server side was missing (#3597) +- [tests] fix testcases with hard coded Date.now (#3597) ## [2.29.0] - 2024-10-01 diff --git a/tests/configs/modules/calendar/exdate_la_at_midnight_dst.js b/tests/configs/modules/calendar/exdate_la_at_midnight_dst.js index c9fbb4da1c..b58475752f 100644 --- a/tests/configs/modules/calendar/exdate_la_at_midnight_dst.js +++ b/tests/configs/modules/calendar/exdate_la_at_midnight_dst.js @@ -30,10 +30,6 @@ let config = { ] }; -Date.now = () => { - return new Date("19 Oct 2023 12:30:00 GMT-07:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/exdate_la_at_midnight_std.js b/tests/configs/modules/calendar/exdate_la_at_midnight_std.js index e59c4114f5..e9cab5d772 100644 --- a/tests/configs/modules/calendar/exdate_la_at_midnight_std.js +++ b/tests/configs/modules/calendar/exdate_la_at_midnight_std.js @@ -30,10 +30,6 @@ let config = { ] }; -Date.now = () => { - return new Date("19 Oct 2023 12:30:00 GMT-07:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/exdate_la_before_midnight.js b/tests/configs/modules/calendar/exdate_la_before_midnight.js index c91188d3cc..bfb7218224 100644 --- a/tests/configs/modules/calendar/exdate_la_before_midnight.js +++ b/tests/configs/modules/calendar/exdate_la_before_midnight.js @@ -30,10 +30,6 @@ let config = { ] }; -Date.now = () => { - return new Date("19 Oct 2023 12:30:00 GMT-07:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/exdate_syd_at_midnight_dst.js b/tests/configs/modules/calendar/exdate_syd_at_midnight_dst.js index edd09798a4..7ce81cd779 100644 --- a/tests/configs/modules/calendar/exdate_syd_at_midnight_dst.js +++ b/tests/configs/modules/calendar/exdate_syd_at_midnight_dst.js @@ -30,10 +30,6 @@ let config = { ] }; -Date.now = () => { - return new Date("14 Sep 2023 12:30:00 GMT+10:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/exdate_syd_at_midnight_std.js b/tests/configs/modules/calendar/exdate_syd_at_midnight_std.js index a6b5fdfbb6..06f974f05a 100644 --- a/tests/configs/modules/calendar/exdate_syd_at_midnight_std.js +++ b/tests/configs/modules/calendar/exdate_syd_at_midnight_std.js @@ -30,10 +30,6 @@ let config = { ] }; -Date.now = () => { - return new Date("14 Sep 2023 12:30:00 GMT+10:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/exdate_syd_before_midnight.js b/tests/configs/modules/calendar/exdate_syd_before_midnight.js index b8b3017da2..f83518ed87 100644 --- a/tests/configs/modules/calendar/exdate_syd_before_midnight.js +++ b/tests/configs/modules/calendar/exdate_syd_before_midnight.js @@ -30,10 +30,6 @@ let config = { ] }; -Date.now = () => { - return new Date("14 Sep 2023 12:30:00 GMT+10:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/rrule_until.js b/tests/configs/modules/calendar/rrule_until.js index 90daa9a3e4..ace727f5bc 100644 --- a/tests/configs/modules/calendar/rrule_until.js +++ b/tests/configs/modules/calendar/rrule_until.js @@ -22,10 +22,6 @@ let config = { ] }; -Date.now = () => { - return new Date("07 Mar 2024 10:38:00 GMT-07:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; diff --git a/tests/configs/modules/calendar/sliceMultiDayEvents.js b/tests/configs/modules/calendar/sliceMultiDayEvents.js index 987ccd8945..c46e316eb3 100644 --- a/tests/configs/modules/calendar/sliceMultiDayEvents.js +++ b/tests/configs/modules/calendar/sliceMultiDayEvents.js @@ -22,10 +22,6 @@ let config = { ] }; -Date.now = () => { - return new Date("01 Sept 2024 10:38:00 GMT+2:00").valueOf(); -}; - /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config;