Skip to content

Commit

Permalink
test: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Oct 10, 2024
1 parent e2c45ec commit 25868f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/vite/src/node/__tests__/environment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'node:path'
import { describe, expect, test } from 'vitest'
import { describe, expect, onTestFinished, test } from 'vitest'
import type { RollupOutput } from 'rollup'
import { createServer } from '../server'
import { defineConfig } from '../config'
Expand All @@ -10,7 +10,7 @@ describe('custom environment conditions', () => {
function getConfig() {
return defineConfig({
root: import.meta.dirname,
logLevel: 'silent',
logLevel: 'error',
server: {
middlewareMode: true,
},
Expand Down Expand Up @@ -121,6 +121,8 @@ describe('custom environment conditions', () => {

test('dev', async () => {
const server = await createServer(getConfig())
onTestFinished(() => server.close())

const results: Record<string, unknown> = {}
for (const key of [
'ssr',
Expand Down Expand Up @@ -153,6 +155,8 @@ describe('custom environment conditions', () => {

test('css', async () => {
const server = await createServer(getConfig())
onTestFinished(() => server.close())

const modJs = await server.ssrLoadModule(
'/fixtures/test-dep-conditions-app/entry.js',
)
Expand Down

0 comments on commit 25868f2

Please sign in to comment.