Skip to content

Conversation

@KristjanESPERANTO
Copy link
Collaborator

This is a big change, but I think it's a good move, as vitest is much more modern than jest.

I'm excited about the UI watch feature (run npm run test:ui), for example - it's really helpful and saves time when debugging tests. I had to adjust a few tests because they had time related issues, but basically we are now testing the same things - even a bit better and less flaky (I hope).

What do you think?

@khassel
Copy link
Collaborator

khassel commented Nov 2, 2025

Give me some time to review, it's to late now ...

I did the switch to jest some time ago, but I'm not bothered about which testing system we use here. Another advantage is that vitest can handle the current jsdom version ...

@khassel khassel merged commit 462abf7 into MagicMirrorOrg:develop Nov 3, 2025
9 checks passed
@KristjanESPERANTO KristjanESPERANTO deleted the feature/migrate-to-vitest branch November 3, 2025 19:00
@KristjanESPERANTO
Copy link
Collaborator Author

@khassel Thanks for checking and accepting!

I'm curious to see how/if it will affect things in the future.

@khassel
Copy link
Collaborator

khassel commented Nov 3, 2025

Looking into the tests I see a lot of error and debug messages, any idea to get rid of them?

@KristjanESPERANTO
Copy link
Collaborator Author

The verbose output is caused by this:

  1. Vitest behavior - Unlike Jest, Vitest doesn't automatically suppress console output by default
  2. Intentional test errors - Many tests deliberately trigger error conditions (missing configs, invalid files, etc.) to verify error handling works correctly

I've created a PR (#3941) to improve the situation by setting LOG_LEVEL=ERROR in CI environments (in tests/utils/vitest-setup.js). This should eliminate most of the noise while keeping the intentional error messages visible.

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