Skip to content

test(node-integration): Migrate to Vitest #15499

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

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Feb 25, 2025

ref #11084

Sorry for the huge PR, it was quite unavoidable! Vitest doesn't support the done callback that most Node integration tests used with Jest.

This PR:

  • Modifies all tests to:
    • Use Vitest imports
    • Use async rather than callback
  • Changes test runner and test server to be async
    • runner.start(done) becomes await runner.start().completed()
    • createTestServer() close function now throws any errors that occurred

@timfish timfish marked this pull request as ready for review February 25, 2025 22:36
@AbhiPrasad
Copy link
Member

Seems like vitest shaves off ~20 seconds from looking at CI and comparing locally as well.

@AbhiPrasad AbhiPrasad merged commit fda7103 into develop Feb 26, 2025
35 checks passed
@AbhiPrasad AbhiPrasad deleted the timfish/test/vitest-node-integration branch February 26, 2025 14:29
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