From df0f836dcb23ff99dffad29139fe7a63ae573317 Mon Sep 17 00:00:00 2001 From: 4eb0da Date: Thu, 5 May 2022 21:48:04 +0300 Subject: [PATCH] Fixes after review --- .../_config.js | 16 +++++++++++++++- .../main.svelte | 6 ++---- .../_config.js | 16 +++++++++++++++- .../main.svelte | 6 ++---- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/test/runtime/samples/component-binding-each-remount-keyed/_config.js b/test/runtime/samples/component-binding-each-remount-keyed/_config.js index 3cec1a2d6b..181c1bce8b 100644 --- a/test/runtime/samples/component-binding-each-remount-keyed/_config.js +++ b/test/runtime/samples/component-binding-each-remount-keyed/_config.js @@ -32,8 +32,22 @@ export default { `, - async test({ assert, component }) { + async test({ assert, component, target }) { await component.done; assert.equal(component.getCounter(), 13); + assert.htmlEqual(target.innerHTML, ` +
+ 0 + 1 +
+
+ 0 + 1 +
+
+ 0 + 1 +
+ `); } }; diff --git a/test/runtime/samples/component-binding-each-remount-keyed/main.svelte b/test/runtime/samples/component-binding-each-remount-keyed/main.svelte index fd48176696..561e3111c7 100644 --- a/test/runtime/samples/component-binding-each-remount-keyed/main.svelte +++ b/test/runtime/samples/component-binding-each-remount-keyed/main.svelte @@ -12,16 +12,14 @@ }; let vals = [1, 2, 3]; - let instances = []; + const instances = []; let count = 3; - let increment = () => { + const increment = () => { ++updateCounter; }; onMount(() => { - console.log(instances); - count = 2; setTimeout(() => { diff --git a/test/runtime/samples/component-binding-each-remount-unkeyed/_config.js b/test/runtime/samples/component-binding-each-remount-unkeyed/_config.js index 3cec1a2d6b..181c1bce8b 100644 --- a/test/runtime/samples/component-binding-each-remount-unkeyed/_config.js +++ b/test/runtime/samples/component-binding-each-remount-unkeyed/_config.js @@ -32,8 +32,22 @@ export default { `, - async test({ assert, component }) { + async test({ assert, component, target }) { await component.done; assert.equal(component.getCounter(), 13); + assert.htmlEqual(target.innerHTML, ` +
+ 0 + 1 +
+
+ 0 + 1 +
+
+ 0 + 1 +
+ `); } }; diff --git a/test/runtime/samples/component-binding-each-remount-unkeyed/main.svelte b/test/runtime/samples/component-binding-each-remount-unkeyed/main.svelte index fd48176696..561e3111c7 100644 --- a/test/runtime/samples/component-binding-each-remount-unkeyed/main.svelte +++ b/test/runtime/samples/component-binding-each-remount-unkeyed/main.svelte @@ -12,16 +12,14 @@ }; let vals = [1, 2, 3]; - let instances = []; + const instances = []; let count = 3; - let increment = () => { + const increment = () => { ++updateCounter; }; onMount(() => { - console.log(instances); - count = 2; setTimeout(() => {