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(() => {