Skip to content

Commit c916754

Browse files
committed
disable test in async mode
1 parent 105f22e commit c916754

File tree

2 files changed

+8
-4
lines changed
  • packages/svelte/tests

2 files changed

+8
-4
lines changed

packages/svelte/tests/runtime-legacy/shared.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export interface RuntimeTest<Props extends Record<string, any> = Record<string,
4747
skip_mode?: Array<'server' | 'client' | 'hydrate'>;
4848
/** Skip if running with process.env.NO_ASYNC */
4949
skip_no_async?: boolean;
50+
/** Skip if running without process.env.NO_ASYNC */
51+
skip_async?: boolean;
5052
html?: string;
5153
ssrHtml?: string;
5254
compileOptions?: Partial<CompileOptions>;
@@ -128,6 +130,10 @@ export function runtime_suite(runes: boolean) {
128130
return true;
129131
}
130132

133+
if (async_mode && config.skip_async) {
134+
return true;
135+
}
136+
131137
if (variant === 'hydrate') {
132138
if (config.mode && !config.mode.includes('hydrate')) return 'no-test';
133139
if (config.skip_mode?.includes('hydrate')) return true;

packages/svelte/tests/runtime-runes/samples/untrack-own-deriveds/_config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import { flushSync } from 'svelte';
22
import { test } from '../../test';
33

44
export default test({
5-
// In async mode we _do_ want to run effects that react to their own state changing, so we need to disable async mode here
6-
compileOptions: {
7-
experimental: { async: false }
8-
},
5+
// In async mode we _do_ want to run effects that react to their own state changing
6+
skip_async: true,
97
test({ assert, target, logs }) {
108
const button = target.querySelector('button');
119

0 commit comments

Comments
 (0)