From 6ef52d1e2dff358b6dd6a78d3ddafc5114da31eb Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 26 Aug 2025 17:07:45 +0200 Subject: [PATCH] fix --- .../samples/flush-sync-inside-attachment/_config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/svelte/tests/runtime-runes/samples/flush-sync-inside-attachment/_config.js b/packages/svelte/tests/runtime-runes/samples/flush-sync-inside-attachment/_config.js index b34a90e901..ec8858b2c6 100644 --- a/packages/svelte/tests/runtime-runes/samples/flush-sync-inside-attachment/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/flush-sync-inside-attachment/_config.js @@ -1,8 +1,12 @@ +import { async_mode } from '../../../helpers'; import { test } from '../../test'; export default test({ + // In legacy mode this succeeds and logs 'hello' + // In async mode this throws an error because flushSync is called inside an effect async test({ assert, target, logs }) { assert.htmlEqual(target.innerHTML, `
hello
`); assert.deepEqual(logs, ['hello']); - } + }, + runtime_error: async_mode ? 'flush_sync_in_effect' : undefined });