Skip to content

Conversation

@KristjanESPERANTO
Copy link
Collaborator

@KristjanESPERANTO KristjanESPERANTO commented Nov 3, 2025

CI Log Suppression

Two-level approach for clean test output:

  1. Suppress debug/info logs: Call logger.setLogLevel("ERROR") in CI to hide verbose logging
  2. Suppress intentional error logs: Set mmTestMode flag and check it before logging errors that are part of test assertions (e.g., testing error handling in git_helper.js and server_functions.js)

This keeps CI output clean and makes genuine failures immediately visible, while preserving full logging for local development.

Before: 1348 log lines with verbose debug/info output
After: 168 log clean lines with only test results

Calendar Symbol Test Stability

Convert the calendar symbol test from external URL (calendarlabs.com) to existing local mock file (12_events.ics). This eliminates CI timeouts caused by external dependencies and improves test reliability.

The test still validates the same symbol array feature but now runs faster and deterministically without network dependencies.

Set LOG_LEVEL=ERROR in vitest-setup.js when running in CI to reduce
verbose console output while keeping full logging for local development.
@KristjanESPERANTO
Copy link
Collaborator Author

The failing test looks like a Timing-Flake 🤔 I'm looking into it.

Replace external calendarlabs.com URL with local mock file to improve
test stability and CI reliability. External URLs can cause timeouts and
introduce non-deterministic failures unrelated to the tested functionality.

The test still validates the same symbol array feature but now runs faster
and more reliably without external dependencies.
@KristjanESPERANTO KristjanESPERANTO changed the title [tests] suppress debug logs in CI environment [tests] suppress debug logs in CI environment + improve calendar symbol test stability Nov 3, 2025
@KristjanESPERANTO KristjanESPERANTO marked this pull request as draft November 3, 2025 19:58
@KristjanESPERANTO
Copy link
Collaborator Author

Test works now -> PR description updated -> still a lot of logging -> I'm investigating

@KristjanESPERANTO KristjanESPERANTO marked this pull request as ready for review November 3, 2025 20:18
@KristjanESPERANTO KristjanESPERANTO marked this pull request as draft November 3, 2025 20:30
@KristjanESPERANTO
Copy link
Collaborator Author

Hold on. I'll take a look at the expected error messages so that we might get a clean output after all 🤓

@KristjanESPERANTO KristjanESPERANTO marked this pull request as ready for review November 3, 2025 22:39
@KristjanESPERANTO
Copy link
Collaborator Author

We now have clean output - the expected error messages are no longer displayed in test mode 🚀

@khassel khassel merged commit d7348ed into MagicMirrorOrg:develop Nov 3, 2025
10 checks passed
@KristjanESPERANTO KristjanESPERANTO deleted the vitest branch November 3, 2025 23:19
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