From 1ed5c46f92b5c8145cb7a655435a169964920c57 Mon Sep 17 00:00:00 2001 From: patrickpircher Date: Fri, 26 Jan 2024 10:05:16 +0100 Subject: [PATCH] add ast test --- .../@glimmer/syntax/test/parser-node-test.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/@glimmer/syntax/test/parser-node-test.ts b/packages/@glimmer/syntax/test/parser-node-test.ts index 0b0e3ca366..f0355819e8 100644 --- a/packages/@glimmer/syntax/test/parser-node-test.ts +++ b/packages/@glimmer/syntax/test/parser-node-test.ts @@ -230,6 +230,26 @@ test('Simple embedded block helpers', () => { ); }); +test('block params', () => { + let t = '{{#Foo as |bar baz qux|}}{{/Foo}}'; + astEqual( + t, + b.program([ + b.element( + 'Foo', + { + blockParams: ['bar', 'baz', 'qux'] + }), + b.block( + b.path('Foo'), + [], + b.hash(), + b.blockItself([], ['bar', 'baz', 'qux']) + ) + ]) + ); +}); + test('Involved block helper', () => { let t = '

hi

content {{#testing shouldRender}}

Appears!

{{/testing}} more content here';