@@ -32,6 +32,7 @@ test('should render dynamic import', async () => {
32
32
await dynamicImportButton . click ( ) ;
33
33
await untilUpdated ( ( ) => getText ( '#dynamic-import .label' ) , 'dynamic-import' ) ;
34
34
} ) ;
35
+
35
36
test ( 'should not have failed requests' , async ( ) => {
36
37
browserLogs . forEach ( ( msg ) => {
37
38
expect ( msg ) . not . toMatch ( '404' ) ;
@@ -123,7 +124,7 @@ if (!isBuild) {
123
124
expect ( await getText ( `#hmr-test-3 .counter` ) ) . toBe ( '0' ) ;
124
125
} ) ;
125
126
126
- test ( 'should work with emitCss: false' , async ( ) => {
127
+ test ( 'should work with emitCss: false in vite config ' , async ( ) => {
127
128
await editViteConfig ( ( c ) => c . replace ( 'svelte()' , 'svelte({emitCss:false})' ) ) ;
128
129
expect ( await getText ( `#hmr-test-1 .counter` ) ) . toBe ( '0' ) ;
129
130
expect ( await getColor ( `#hmr-test-1 .label` ) ) . toBe ( 'green' ) ;
@@ -135,6 +136,15 @@ if (!isBuild) {
135
136
expect ( await getText ( `#hmr-test-1 .counter` ) ) . toBe ( '1' ) ;
136
137
} ) ;
137
138
139
+ test ( 'should work with emitCss: false in svelte config' , async ( ) => {
140
+ addFile ( 'svelte.config.cjs' , `module.exports={emitCss:false}` ) ;
141
+ await sleep ( isWin ? 1000 : 500 ) ; // adding config restarts server, give it some time
142
+ await page . goto ( viteTestUrl , { waitUntil : 'networkidle' } ) ;
143
+ await sleep ( 50 ) ;
144
+ expect ( await getColor ( `#hmr-test-1 .label` ) ) . toBe ( 'red' ) ;
145
+ removeFile ( 'svelte.config.cjs' ) ;
146
+ } ) ;
147
+
138
148
test ( 'should detect changes in svelte config and restart' , async ( ) => {
139
149
const injectPreprocessor = ( { content, filename } ) => {
140
150
if ( filename && filename . includes ( 'App.svelte' ) ) {
0 commit comments