Skip to content

Commit 20b39c4

Browse files
authored
test(vite-node): test css import (#7653)
1 parent eab5c37 commit 20b39c4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/vite-node/src/deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import './deps.css'
22

33
// eslint-disable-next-line no-console
4-
console.log('deps')
4+
console.log('[deps.ts] imported')
55

66
export {}
77

test/vite-node/test/hmr.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ test('can handle top-level throw in self-accepting module', async () => {
2828
await viteNode.waitForStderr('some error')
2929
await viteNode.waitForStderr(`[hmr] Failed to reload ${scriptFile}. This could be due to syntax errors or importing non-existent modules. (see errors above)`)
3030
})
31+
32+
test('basic', async () => {
33+
const { viteNode } = await runViteNodeCli('--watch', resolve(__dirname, '../src/testMod.ts'))
34+
await viteNode.waitForStdout('[deps.ts] imported')
35+
})

0 commit comments

Comments
 (0)