Skip to content

test(calendar): fix hardcoded date in event shape test#4055

Merged
khassel merged 1 commit intoMagicMirrorOrg:developfrom
KristjanESPERANTO:test
Mar 11, 2026
Merged

test(calendar): fix hardcoded date in event shape test#4055
khassel merged 1 commit intoMagicMirrorOrg:developfrom
KristjanESPERANTO:test

Conversation

@KristjanESPERANTO
Copy link
Collaborator

While looking into #4053 I noticed that one of the calendar tests had stopped working. The cause was simple: the test had 2026-03-10 hardcoded, and since that date is now in the past, the event was silently filtered out by includePastEvents: false.

Instead of bumping the date to some future value (which would only delay the same problem), I made it relative so it always lies in the future.

Command to test:

npx vitest run tests/unit/modules/default/calendar/

Replace the fixed 2026-03-10 date with a relative date (tomorrow)
so the test doesn't silently fail once the date has passed.
firstYear is now derived dynamically from the generated start date.
@khassel khassel merged commit 9fe7d1e into MagicMirrorOrg:develop Mar 11, 2026
9 checks passed
@KristjanESPERANTO KristjanESPERANTO deleted the test branch March 12, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants