diff --git a/test/runtime/samples/error-handling-keyed-each-block-reactive/_config.js b/test/runtime/samples/error-handling-keyed-each-block-reactive/_config.js new file mode 100644 index 0000000000..773299e415 --- /dev/null +++ b/test/runtime/samples/error-handling-keyed-each-block-reactive/_config.js @@ -0,0 +1,10 @@ +export default { + async test({ assert, component, target, window }) { + const button = target.querySelector('button'); + const event = new window.MouseEvent('click'); + + await button.dispatchEvent(event); + + assert.equal(component.error, true); + } +}; diff --git a/test/runtime/samples/error-handling-keyed-each-block-reactive/main.svelte b/test/runtime/samples/error-handling-keyed-each-block-reactive/main.svelte new file mode 100644 index 0000000000..567c8273bd --- /dev/null +++ b/test/runtime/samples/error-handling-keyed-each-block-reactive/main.svelte @@ -0,0 +1,25 @@ + + + + +{#each a as item (item.a.b)} + {item} +{/each} \ No newline at end of file diff --git a/test/runtime/samples/error-handling-keyed-each-block/_config.js b/test/runtime/samples/error-handling-keyed-each-block/_config.js new file mode 100644 index 0000000000..fab5d76ee6 --- /dev/null +++ b/test/runtime/samples/error-handling-keyed-each-block/_config.js @@ -0,0 +1,5 @@ +export default { + test({ assert, component }) { + assert.equal(component.error, true); + } +}; diff --git a/test/runtime/samples/error-handling-keyed-each-block/main.svelte b/test/runtime/samples/error-handling-keyed-each-block/main.svelte new file mode 100644 index 0000000000..98c79c454b --- /dev/null +++ b/test/runtime/samples/error-handling-keyed-each-block/main.svelte @@ -0,0 +1,14 @@ + + +{#each a as item (item.a.b)} + {item} +{/each} \ No newline at end of file