File tree Expand file tree Collapse file tree
transforms/angle-brackets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,6 +294,38 @@ test('if', () => {
294294 ` ) ;
295295} ) ;
296296
297+ test ( 'nested-else-if' , ( ) => {
298+ let input = `
299+ {{#if a}}
300+ {{my-component1 foo="bar"}}
301+ {{else if b}}
302+ {{my-component2 foo="bar"}}
303+ {{else if c}}
304+ {{my-component3 foo="bar"}}
305+ {{else if d}}
306+ {{my-component4 foo="bar"}}
307+ {{else}}
308+ {{my-component5 foo="bar"}}
309+ {{/if}}
310+ ` ;
311+
312+ expect ( runTest ( 'if.hbs' , input ) ) . toMatchInlineSnapshot ( `
313+ "
314+ {{#if a}}
315+ <MyComponent1 @foo=\\"bar\\" />
316+ {{else if b}}
317+ <MyComponent2 @foo=\\"bar\\" />
318+ {{else if c}}
319+ <MyComponent3 @foo=\\"bar\\" />
320+ {{else if d}}
321+ <MyComponent4 @foo=\\"bar\\" />
322+ {{else}}
323+ <MyComponent5 @foo=\\"bar\\" />
324+ {{/if}}
325+ "
326+ ` ) ;
327+ } ) ;
328+
297329test ( 'input-helper' , ( ) => {
298330 let input = `
299331 {{input type="checkbox" name="email-opt-in" checked=this.model.emailPreference}}
You can’t perform that action at this time.
0 commit comments