Skip to content

Commit bf90654

Browse files
committed
bring async-effect-after-await test from defer-effects-in-pending-boundary branch
1 parent f225c63 commit bf90654

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<script>
2+
$effect(() => {
3+
console.log('before');
4+
});
5+
26
await 1;
37
48
$effect(() => {
5-
console.log('hello');
9+
console.log('after');
610
});
711
</script>

packages/svelte/tests/runtime-runes/samples/async-effect-after-await/_config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test } from '../../test';
33

44
export default test({
55
async test({ assert, logs }) {
6+
assert.deepEqual(logs, []);
67
await tick();
7-
assert.deepEqual(logs, ['hello']);
8+
assert.deepEqual(logs, ['before', 'after']);
89
}
910
});

0 commit comments

Comments
 (0)