disable test in async mode

pull/16198/head
Simon Holthausen 3 months ago
parent 105f22e967
commit c916754785

@ -47,6 +47,8 @@ export interface RuntimeTest<Props extends Record<string, any> = Record<string,
skip_mode?: Array<'server' | 'client' | 'hydrate'>;
/** Skip if running with process.env.NO_ASYNC */
skip_no_async?: boolean;
/** Skip if running without process.env.NO_ASYNC */
skip_async?: boolean;
html?: string;
ssrHtml?: string;
compileOptions?: Partial<CompileOptions>;
@ -128,6 +130,10 @@ export function runtime_suite(runes: boolean) {
return true;
}
if (async_mode && config.skip_async) {
return true;
}
if (variant === 'hydrate') {
if (config.mode && !config.mode.includes('hydrate')) return 'no-test';
if (config.skip_mode?.includes('hydrate')) return true;

@ -2,10 +2,8 @@ import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
// In async mode we _do_ want to run effects that react to their own state changing, so we need to disable async mode here
compileOptions: {
experimental: { async: false }
},
// In async mode we _do_ want to run effects that react to their own state changing
skip_async: true,
test({ assert, target, logs }) {
const button = target.querySelector('button');

Loading…
Cancel
Save