From 0ee59a03608b08805dc3eeef8ea3ad6ac55cace7 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 18 Nov 2017 14:30:25 -0500 Subject: [PATCH] failing test for #927 --- .../component-slot-each-block/Nested.html | 3 +++ .../component-slot-each-block/_config.js | 24 +++++++++++++++++++ .../component-slot-each-block/main.html | 13 ++++++++++ 3 files changed, 40 insertions(+) create mode 100644 test/runtime/samples/component-slot-each-block/Nested.html create mode 100644 test/runtime/samples/component-slot-each-block/_config.js create mode 100644 test/runtime/samples/component-slot-each-block/main.html diff --git a/test/runtime/samples/component-slot-each-block/Nested.html b/test/runtime/samples/component-slot-each-block/Nested.html new file mode 100644 index 0000000000..8213363fa0 --- /dev/null +++ b/test/runtime/samples/component-slot-each-block/Nested.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-each-block/_config.js b/test/runtime/samples/component-slot-each-block/_config.js new file mode 100644 index 0000000000..34b2302332 --- /dev/null +++ b/test/runtime/samples/component-slot-each-block/_config.js @@ -0,0 +1,24 @@ +export default { + data: { + things: [1, 2, 3] + }, + + html: ` +
+ 1 + 2 + 3 +
`, + + test(assert, component, target) { + component.set({ things: [1, 2, 3, 4] }); + assert.htmlEqual(target.innerHTML, ` +
+ 1 + 2 + 3 + 4 +
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-each-block/main.html b/test/runtime/samples/component-slot-each-block/main.html new file mode 100644 index 0000000000..b503c5af53 --- /dev/null +++ b/test/runtime/samples/component-slot-each-block/main.html @@ -0,0 +1,13 @@ + + {{#each things as thing}} + {{thing}} + {{/each}} + + + \ No newline at end of file