@@ -12,7 +12,8 @@ import {
12
12
fetchPageText ,
13
13
reloadPage ,
14
14
readFileContent ,
15
- IS_SVELTE_BASELINE
15
+ IS_SVELTE_BASELINE ,
16
+ getServerErrors
16
17
} from '~utils' ;
17
18
18
19
import glob from 'tiny-glob' ;
@@ -95,6 +96,11 @@ describe('kit-node', () => {
95
96
expect ( browserLogs . some ( ( x ) => x === 'onMount dynamic imported isSSR: false' ) ) . toBe ( true ) ;
96
97
} ) ;
97
98
99
+ it ( 'should load dynamic import with css' , async ( ) => {
100
+ expect ( await getText ( '#dynamic-imported' ) ) . toBe ( "i'm blue" ) ;
101
+ expect ( await getColor ( '#css-transform' ) ) . toBe ( 'blue' ) ;
102
+ } ) ;
103
+
98
104
it ( 'should respect transforms' , async ( ) => {
99
105
expect ( await getText ( '#js-transform' ) ) . toBe ( 'Hello world' ) ;
100
106
expect ( await getColor ( '#css-transform' ) ) . toBe ( 'red' ) ;
@@ -197,6 +203,12 @@ describe('kit-node', () => {
197
203
expect ( await getText ( '#hmr-test2' ) ) . toBe ( 'bar' ) ;
198
204
} ) ;
199
205
206
+ it ( 'should not have errors on reload' , async ( ) => {
207
+ expect ( getServerErrors ( ) , 'error log of `vite dev` is not empty before reload' ) . toEqual ( [ ] ) ;
208
+ await reloadPage ( ) ;
209
+ expect ( getServerErrors ( ) , 'error log of `vite dev` is not empty after reload' ) . toEqual ( [ ] ) ;
210
+ } ) ;
211
+
200
212
describe ( 'child component update' , ( ) => {
201
213
const updateChild = editFileAndWaitForHmrComplete . bind ( null , 'src/lib/Child.svelte' ) ;
202
214
const updateCounter = editFileAndWaitForHmrComplete . bind ( null , 'src/lib/Counter.svelte' ) ;
0 commit comments