Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use vitest for testing #1270

Merged
merged 5 commits into from
Dec 21, 2024
Merged

feat: Use vitest for testing #1270

merged 5 commits into from
Dec 21, 2024

Conversation

Nerivec
Copy link
Collaborator

@Nerivec Nerivec commented Dec 19, 2024

https://vitest.dev/guide/why.html

Reasoning:

  • More modern approach (TS, ESM...).
    • Jest is annoying (at best) with ESM, clearly something that will be more and more of a problem
  • API is almost compatible with Jest, required less refactoring (than going to Node built-in for example, where several things would need complete refactoring)
  • Support for snapshots
  • Support for bench (might be good to have something like this in CI with automatic reporting in PRs, at least for critical logic)
  • Support for types testing
  • Can use @vitest/ui locally if needed
  • Similar to above, can use vscode extension (this one is definitely a great addition!)
  • Faster, cleaner (lot less deps)

Related changes:

  • Fix couple of ZNP tests that weren't behaving as expected (testing timeouts)
  • Fix CONNECTED state not cleared in closePort() in ASH protocol for ember (only has an impact in tests due to various bypasses)
  • Cleanup coverage ignore (many stale ones that were never cleared)
  • Fix inconsistent mocking of date in controller (and cleanup some stale mocks).

package.json Show resolved Hide resolved
@Koenkk Koenkk merged commit 47b902e into Koenkk:master Dec 21, 2024
1 check passed
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