From 20b39c41e3caf09bd33ecf90cd5072a9805d5fe7 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Tue, 11 Mar 2025 22:39:54 +0900 Subject: [PATCH] test(vite-node): test css import (#7653) --- test/vite-node/src/deps.ts | 2 +- test/vite-node/test/hmr.test.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/vite-node/src/deps.ts b/test/vite-node/src/deps.ts index c81840a1d..7dfabf9fc 100644 --- a/test/vite-node/src/deps.ts +++ b/test/vite-node/src/deps.ts @@ -1,7 +1,7 @@ import './deps.css' // eslint-disable-next-line no-console -console.log('deps') +console.log('[deps.ts] imported') export {} diff --git a/test/vite-node/test/hmr.test.ts b/test/vite-node/test/hmr.test.ts index f24d8a7d7..45296fbf3 100644 --- a/test/vite-node/test/hmr.test.ts +++ b/test/vite-node/test/hmr.test.ts @@ -28,3 +28,8 @@ test('can handle top-level throw in self-accepting module', async () => { await viteNode.waitForStderr('some error') await viteNode.waitForStderr(`[hmr] Failed to reload ${scriptFile}. This could be due to syntax errors or importing non-existent modules. (see errors above)`) }) + +test('basic', async () => { + const { viteNode } = await runViteNodeCli('--watch', resolve(__dirname, '../src/testMod.ts')) + await viteNode.waitForStdout('[deps.ts] imported') +}) -- 2.51.2