From 9b135536652da2b090622deb120ae2acb6a05225 Mon Sep 17 00:00:00 2001 From: Bryan Terce Date: Sun, 23 Jun 2019 02:24:44 -0700 Subject: [PATCH] Add test case for binding using each block value --- .../Foo.svelte | 1 + .../_config.js | 12 ++++++++++++ .../main.svelte | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 test/runtime/samples/binding-this-component-each-block-value/Foo.svelte create mode 100644 test/runtime/samples/binding-this-component-each-block-value/_config.js create mode 100644 test/runtime/samples/binding-this-component-each-block-value/main.svelte diff --git a/test/runtime/samples/binding-this-component-each-block-value/Foo.svelte b/test/runtime/samples/binding-this-component-each-block-value/Foo.svelte new file mode 100644 index 0000000000..066a48b65e --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block-value/Foo.svelte @@ -0,0 +1 @@ +
foo
\ No newline at end of file diff --git a/test/runtime/samples/binding-this-component-each-block-value/_config.js b/test/runtime/samples/binding-this-component-each-block-value/_config.js new file mode 100644 index 0000000000..2b5df8c595 --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block-value/_config.js @@ -0,0 +1,12 @@ +export default { + skip_if_ssr: true, + + html: ` +
foo
+
first has foo: true
+
foo
+
second has foo: true
+
foo
+
third has foo: true
+ ` +}; diff --git a/test/runtime/samples/binding-this-component-each-block-value/main.svelte b/test/runtime/samples/binding-this-component-each-block-value/main.svelte new file mode 100644 index 0000000000..5093eecd3f --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block-value/main.svelte @@ -0,0 +1,11 @@ + + +{#each ["first", "second", "third"] as value} + +
+ {value} has foo: {!!foo[value]} +
+{/each}