File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
samples/component-not-constructor2
runtime-runes/samples/bind-this-proxy Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11import { test } from '../../test' ;
22
33export default test ( {
4+ compileOptions : {
5+ // override process.env.HMR — this test only passes in prod mode because in dev mode we generate a helpful error
6+ dev : false
7+ } ,
8+
49 get props ( ) {
510 return { componentName : 'Sub' } ;
611 } ,
Original file line number Diff line number Diff line change @@ -138,11 +138,13 @@ export function runtime_suite(runes: boolean) {
138138}
139139
140140async function common_setup ( cwd : string , runes : boolean | undefined , config : RuntimeTest ) {
141+ const force_hmr = process . env . HMR && config . compileOptions ?. dev !== false && ! config . error ;
142+
141143 const compileOptions : CompileOptions = {
142144 generate : 'client' ,
143145 rootDir : cwd ,
144- dev : process . env . HMR ? true : undefined ,
145- hmr : process . env . HMR ? true : undefined ,
146+ dev : force_hmr ? true : undefined ,
147+ hmr : force_hmr ? true : undefined ,
146148 ...config . compileOptions ,
147149 immutable : config . immutable ,
148150 accessors : 'accessors' in config ? config . accessors : true ,
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import { flushSync } from 'svelte';
22import { test } from '../../test' ;
33
44export default test ( {
5+ compileOptions : {
6+ // override process.env.HMR — this test only passes in prod mode, because in dev we add `$destroy` methods etc
7+ dev : false
8+ } ,
9+
510 html : `<button>Toggle</button><div>Hello\nworld</div>` ,
611
712 async test ( { assert, target, logs } ) {
You can’t perform that action at this time.
0 commit comments