Skip to content

Commit 6ef52d1

Browse files
committed
fix
1 parent 8cae69b commit 6ef52d1

File tree

1 file changed

+5
-1
lines changed
  • packages/svelte/tests/runtime-runes/samples/flush-sync-inside-attachment

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
import { async_mode } from '../../../helpers';
12
import { test } from '../../test';
23

34
export default test({
5+
// In legacy mode this succeeds and logs 'hello'
6+
// In async mode this throws an error because flushSync is called inside an effect
47
async test({ assert, target, logs }) {
58
assert.htmlEqual(target.innerHTML, `<button>show</button> <div>hello</div>`);
69
assert.deepEqual(logs, ['hello']);
7-
}
10+
},
11+
runtime_error: async_mode ? 'flush_sync_in_effect' : undefined
812
});

0 commit comments

Comments
 (0)