Skip to content

Commit 5ce969f

Browse files
committed
add comment explaining why we need it at the top level
1 parent a8b96ac commit 5ce969f

File tree

1 file changed

+2
-0
lines changed
  • packages/kit/test/apps/basics/src/routes/remote/batch

1 file changed

+2
-0
lines changed

packages/kit/test/apps/basics/src/routes/remote/batch/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
} from './batch.remote.js';
88
99
const todoIds = ['1', '2', '1', 'error'];
10+
// Need to write this outside at the top level to ensure tests succeed in non-async-mode
11+
// Else updates are not coming through properly because of state-created-inside-effects-not-updating logic in non-async mode
1012
const todos = todoIds.map((id) => ({ id, promise: get_todo(id) }));
1113
</script>
1214

0 commit comments

Comments
 (0)