[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix: close vite servers on all resolved projects (#5544)

authored by

Adithya Haridas and committed by
GitHub
(Apr 17, 2024, 2:48 PM +0200) 413ec5e6 9e6417c9

+3 -3
+3 -3
packages/vitest/src/node/core.ts
··· 868 868 for await (const project of teardownProjects.reverse()) 869 869 await project.teardownGlobalSetup() 870 870 871 - const closePromises: unknown[] = this.projects.map(w => w.close().then(() => w.server = undefined as any)) 871 + const closePromises: unknown[] = this.resolvedProjects.map(w => w.close().then(() => w.server = undefined as any)) 872 872 // close the core workspace server only once 873 873 // it's possible that it's not initialized at all because it's not running any tests 874 - if (!this.projects.includes(this.coreWorkspaceProject)) 874 + if (!this.resolvedProjects.includes(this.coreWorkspaceProject)) 875 875 closePromises.push(this.coreWorkspaceProject.close().then(() => this.server = undefined as any)) 876 876 877 877 if (this.pool) { ··· 905 905 this.state.getProcessTimeoutCauses().forEach(cause => console.warn(cause)) 906 906 907 907 if (!this.pool) { 908 - const runningServers = [this.server, ...this.projects.map(p => p.server)].filter(Boolean).length 908 + const runningServers = [this.server, ...this.resolvedProjects.map(p => p.server)].filter(Boolean).length 909 909 910 910 if (runningServers === 1) 911 911 console.warn('Tests closed successfully but something prevents Vite server from exiting')