Skip to content

Commit

Permalink
add ast test
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Jan 26, 2024
1 parent 30c6199 commit 1ed5c46
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/@glimmer/syntax/test/parser-node-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,26 @@ test('Simple embedded block helpers', () => {
);
});

test('block params', () => {
let t = '<Foo as |bar baz qux|></Foo>{{#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 =
'<p>hi</p> content {{#testing shouldRender}}<p>Appears!</p>{{/testing}} more <em>content</em> here';
Expand Down

0 comments on commit 1ed5c46

Please sign in to comment.