diff --git a/src/parse/read/directives.ts b/src/parse/read/directives.ts index 62a249a158..a1d71a7ef6 100644 --- a/src/parse/read/directives.ts +++ b/src/parse/read/directives.ts @@ -77,7 +77,7 @@ const DIRECTIVES: Record + `, + + test ( assert, component, target, window ) { + const header = target.querySelector( 'h1' ); + const eventClick = new window.MouseEvent( 'click' ); + + header.dispatchEvent( eventClick ); + assert.htmlEqual( target.innerHTML, ` +

Hello World!

+ ` ); + } +}; diff --git a/test/runtime/samples/action-ternary-template/main.html b/test/runtime/samples/action-ternary-template/main.html new file mode 100644 index 0000000000..58e19e28f4 --- /dev/null +++ b/test/runtime/samples/action-ternary-template/main.html @@ -0,0 +1,21 @@ +

+ + \ No newline at end of file