-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
Description
Environment
MagicMirror² version: develop branch
Node version:
npm version:
Platform:
Which start option are you using?
node --run server
Are you using PM2?
No
Module
None
Have you tried disabling other modules?
- Yes
- No
Have you searched if someone else has already reported the issue on the forum or in the issues?
- Yes
What did you do?
node@e8f736e24b5c:/opt/magic_mirror$ npx jest tests/unit/modules/default/calendar/calendar_fetcher_utils_spec.js
FAIL unit tests/unit/modules/default/calendar/calendar_fetcher_utils_spec.js
Calendar fetcher utils test
filterEvents
✓ should return only ongoing and upcoming non full day events (46 ms)
✓ should return only ongoing and upcoming full day events (1 ms)
✕ should return the correct times when recurring events pass through daylight saving time (40 ms)
✓ should return the correct moments based on the timezone given (17 ms)
● Calendar fetcher utils test › filterEvents › should return the correct times when recurring events pass through daylight saving time
TypeError: Cannot read properties of undefined (reading 'startDate')
80 | .tz(moment.tz.guess()); // Convert to guessed timezone as that is used in the filterEvents
81 |
> 82 | let julyMoment = moment(`${moment(julyFirst[0].startDate, "x").format("YYYY")}-07-01T09:00:00`)
| ^
83 | .tz("Europe/Amsterdam", true) // Convert to Europe/Amsterdam timezone (see event ical) but keep 9 o'clock
84 | .tz(moment.tz.guess()); // Convert to guessed timezone as that is used in the filterEvents
85 |
at Object.startDate (tests/unit/modules/default/calendar/calendar_fetcher_utils_spec.js:82:51)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 3 passed, 4 total
Snapshots: 0 total
Time: 0.721 s
Ran all test suites matching tests/unit/modules/default/calendar/calendar_fetcher_utils_spec.js.What did you expect to happen?
test should pass
What actually happened?
test fails
Additional comments
No response
Participation
- I am willing to submit a pull request for this change.