diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-accumulated/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-accumulated/_config.js index f99a1c856b..619fab8a2c 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-accumulated/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-accumulated/_config.js @@ -5,14 +5,10 @@ export default test({ async test({ assert, target, logs }) { const [btn, btn2] = target.querySelectorAll('button'); - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, ['foo', 'baz']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['foo', 'baz', 'foo', 'baz']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-array-length-batch/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-array-length-batch/_config.js index 64f81ac0e2..3ad5b749ee 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-array-length-batch/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-array-length-batch/_config.js @@ -5,14 +5,10 @@ export default test({ async test({ assert, target, logs }) { const [btn, btn2] = target.querySelectorAll('button'); - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, [[{}, {}, {}, {}, {}, {}, {}, {}]]); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, [[{}, {}, {}, {}, {}, {}, {}, {}], []]); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-arrays/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-arrays/_config.js index 7b89518f75..d77d3f9aa7 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-arrays/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-arrays/_config.js @@ -5,19 +5,13 @@ export default test({ async test({ assert, target, logs }) { const [btn, btn2, btn3] = target.querySelectorAll('button'); - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, ['arr']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['arr', 'arr']); - flushSync(() => { - btn3.click(); - }); + flushSync(() => btn3.click()); assert.deepEqual(logs, ['arr', 'arr', 'arr']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-classes/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-classes/_config.js index acb7054cc4..dc9fe8bfb1 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-classes/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-classes/_config.js @@ -9,19 +9,13 @@ export default test({ logs.length = 0; - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, ['class count']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['class count', 'class proxy']); - flushSync(() => { - btn3.click(); - }); + flushSync(() => btn3.click()); assert.deepEqual(logs, ['class count', 'class proxy', 'class proxy']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-extrapolated-reference/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-extrapolated-reference/_config.js index cc0bfbb1e3..ad79aa0092 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-extrapolated-reference/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-extrapolated-reference/_config.js @@ -6,28 +6,15 @@ export default test({ const [btn, btn2, btn3, btn4, btn5, btn6] = target.querySelectorAll('button'); logs.length = 0; - flushSync(() => { - btn.click(); - }); - flushSync(() => { - btn2.click(); - }); - flushSync(() => { - btn3.click(); - }); - flushSync(() => { - btn4.click(); - }); - flushSync(() => { - btn5.click(); - }); + flushSync(() => btn.click()); + flushSync(() => btn2.click()); + flushSync(() => btn3.click()); + flushSync(() => btn4.click()); + flushSync(() => btn5.click()); assert.deepEqual(logs, []); - flushSync(() => { - btn6.click(); - }); - flushSync(() => { - btn.click(); - }); + + flushSync(() => btn6.click()); + flushSync(() => btn.click()); assert.deepEqual(logs, ['arr', 'arr']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-proxies/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-proxies/_config.js index 17d5205d17..42cbcef005 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-proxies/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-proxies/_config.js @@ -5,14 +5,10 @@ export default test({ async test({ assert, target, logs }) { const [btn, btn2] = target.querySelectorAll('button'); - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, ['proxy']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['proxy', 'proxy']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange-reassign-proxy/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange-reassign-proxy/_config.js index 92ddd1369d..d9e2a1fdad 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange-reassign-proxy/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange-reassign-proxy/_config.js @@ -5,26 +5,16 @@ export default test({ async test({ assert, target, logs }) { const [btn, btn2, btn3, btn4] = target.querySelectorAll('button'); - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, ['a']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['a', 'b', 'c']); - flushSync(() => { - btn3.click(); - }); + flushSync(() => btn3.click()); assert.deepEqual(logs, ['a', 'b', 'c', 'b', 'c']); - flushSync(() => { - btn4.click(); - }); + flushSync(() => btn4.click()); assert.deepEqual(logs, ['a', 'b', 'c', 'b', 'c', 'c']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['a', 'b', 'c', 'b', 'c', 'c', 'b']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-onchange/_config.js b/packages/svelte/tests/runtime-runes/samples/state-onchange/_config.js index 91d469a1e9..ecade967c2 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-onchange/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-onchange/_config.js @@ -5,9 +5,7 @@ export default test({ async test({ assert, target, logs }) { const btn = target.querySelector('button'); - flushSync(() => { - btn?.click(); - }); + flushSync(() => btn?.click()); assert.deepEqual(logs, ['count']); } }); diff --git a/packages/svelte/tests/runtime-runes/samples/state-raw-onchange/_config.js b/packages/svelte/tests/runtime-runes/samples/state-raw-onchange/_config.js index ab2a125c12..d1df444372 100644 --- a/packages/svelte/tests/runtime-runes/samples/state-raw-onchange/_config.js +++ b/packages/svelte/tests/runtime-runes/samples/state-raw-onchange/_config.js @@ -10,54 +10,34 @@ export default test({ logs.length = 0; - flushSync(() => { - btn.click(); - }); + flushSync(() => btn.click()); assert.deepEqual(logs, ['count']); - flushSync(() => { - btn2.click(); - }); + flushSync(() => btn2.click()); assert.deepEqual(logs, ['count']); - flushSync(() => { - btn3.click(); - }); + flushSync(() => btn3.click()); assert.deepEqual(logs, ['count', 'proxy']); - flushSync(() => { - btn4.click(); - }); + flushSync(() => btn4.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count']); - flushSync(() => { - btn5.click(); - }); + flushSync(() => btn5.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count']); - flushSync(() => { - btn6.click(); - }); + flushSync(() => btn6.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count', 'class proxy']); - flushSync(() => { - btn7.click(); - }); + flushSync(() => btn7.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count', 'class proxy']); - flushSync(() => { - btn8.click(); - }); + flushSync(() => btn8.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count', 'class proxy']); - flushSync(() => { - btn9.click(); - }); + flushSync(() => btn9.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count', 'class proxy']); - flushSync(() => { - btn10.click(); - }); + flushSync(() => btn10.click()); assert.deepEqual(logs, ['count', 'proxy', 'class count', 'class proxy', 'arr']); } });