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(cli): graceful close of vitest in watch mode #349

Merged
merged 2 commits into from Dec 29, 2021

Conversation

dominikg
Copy link
Contributor

This change ensures that vite buildEnd hook is called and resources are cleaned up gracefully

@netlify
Copy link

netlify bot commented Dec 28, 2021

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: d5d1b33

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/61cb35b46533950007a5ec92

😎 Browse the preview: https://deploy-preview-349--vitest-dev.netlify.app

@@ -248,8 +250,17 @@ class Vitest {
}

async close() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async without await here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not required that async functions contain an await and close returns a promise, so the contract of async is there.
And while it is not strictly needed here i think it doesn't hurt and shows the async nature of the implementation.

@userquin
Copy link
Member

nr ci + pnpm run test:ci + pnpm run test:all working on windows, no memory error reported (6 consecutive runs)

@userquin
Copy link
Member

another 6 consecutives runs with latest changes with no memory error reported on windows

@antfu antfu merged commit ff6efb1 into vitest-dev:main Dec 29, 2021
JakeGinnivan pushed a commit to JakeGinnivan/vitest that referenced this pull request Jan 8, 2022
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.

None yet

5 participants