From 95bbf585fe1850bb24b4064f7dcb63db0da932d3 Mon Sep 17 00:00:00 2001 From: pk Date: Wed, 7 Mar 2018 22:38:48 +0100 Subject: [PATCH] failing test for #1217 --- .../samples/each-block-array-literal/_config.js | 17 +++++++++++++++++ .../samples/each-block-array-literal/main.html | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test/runtime/samples/each-block-array-literal/_config.js create mode 100644 test/runtime/samples/each-block-array-literal/main.html diff --git a/test/runtime/samples/each-block-array-literal/_config.js b/test/runtime/samples/each-block-array-literal/_config.js new file mode 100644 index 0000000000..7fcc477038 --- /dev/null +++ b/test/runtime/samples/each-block-array-literal/_config.js @@ -0,0 +1,17 @@ +export default { + html: ` + + `, + + test ( assert, component, target ) { + assert.htmlEqual( target.innerHTML, ` + + `); + + const button = target.querySelector( 'button' ); + const event = new window.MouseEvent( 'click' ); + + button.dispatchEvent( event ); + assert.equal( component.get( 'clicked' ), 'racoon' ); + }, +}; diff --git a/test/runtime/samples/each-block-array-literal/main.html b/test/runtime/samples/each-block-array-literal/main.html new file mode 100644 index 0000000000..8dca00c92e --- /dev/null +++ b/test/runtime/samples/each-block-array-literal/main.html @@ -0,0 +1,11 @@ +{{#each ['racoon', 'eagle'] as animal}} + +{{/each}} + +