From b7e4064407d3bdb1db083b102291fbf2fede0bb5 Mon Sep 17 00:00:00 2001 From: Bryan Terce Date: Sun, 23 Jun 2019 01:59:15 -0700 Subject: [PATCH] Add test case for binding in each block --- .../binding-this-component-each-block/Foo.svelte | 1 + .../binding-this-component-each-block/_config.js | 12 ++++++++++++ .../binding-this-component-each-block/main.svelte | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 test/runtime/samples/binding-this-component-each-block/Foo.svelte create mode 100644 test/runtime/samples/binding-this-component-each-block/_config.js create mode 100644 test/runtime/samples/binding-this-component-each-block/main.svelte diff --git a/test/runtime/samples/binding-this-component-each-block/Foo.svelte b/test/runtime/samples/binding-this-component-each-block/Foo.svelte new file mode 100644 index 0000000000..066a48b65e --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block/Foo.svelte @@ -0,0 +1 @@ +
foo
\ No newline at end of file diff --git a/test/runtime/samples/binding-this-component-each-block/_config.js b/test/runtime/samples/binding-this-component-each-block/_config.js new file mode 100644 index 0000000000..358c5b5afc --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block/_config.js @@ -0,0 +1,12 @@ +export default { + skip_if_ssr: true, + + html: ` +
foo
+
0 has foo: true
+
foo
+
1 has foo: true
+
foo
+
2 has foo: true
+ ` +}; diff --git a/test/runtime/samples/binding-this-component-each-block/main.svelte b/test/runtime/samples/binding-this-component-each-block/main.svelte new file mode 100644 index 0000000000..49d1d76172 --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block/main.svelte @@ -0,0 +1,11 @@ + + +{#each Array(3) as _, i} + +
+ {i} has foo: {!!foo[i]} +
+{/each}