Skip to content

Commit

Permalink
[BUGFIX beta] Fix linting issue with test.
Browse files Browse the repository at this point in the history
(cherry picked from commit b5276d3)
  • Loading branch information
rwjblue authored and kategengler committed Feb 25, 2020
1 parent 9ff6fe2 commit a125917
Showing 1 changed file with 27 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1361,66 +1361,69 @@ moduleFor(
this.assertStableRerender();
}

['@test GH#18732 hasBlock works within a yielded curried component invoked within mustaches'](assert) {
['@test GH#18732 hasBlock works within a yielded curried component invoked within mustaches']() {
this.registerComponent('component-with-has-block', {
ComponentClass: Component.extend(),
template: '<div>{{hasBlock}}</div>'
template: '<div>{{hasBlock}}</div>',
});

this.registerComponent('yielding-component', {
ComponentClass: Component.extend(),
template: '{{yield (component "component-with-has-block")}}'
template: '{{yield (component "component-with-has-block")}}',
});

this.registerComponent('test-component', {
ComponentClass: Component.extend(),
template: '{{#yielding-component as |componentWithHasBlock|}}{{componentWithHasBlock}}{{/yielding-component}}'
template:
'{{#yielding-component as |componentWithHasBlock|}}{{componentWithHasBlock}}{{/yielding-component}}',
});

this.render('{{test-component}}');

this.assertText('false');
}

['@test GH#18732 has-block works within a yielded curried component invoked with angle bracket invocation (falsy)']() {
this.registerComponent('component-with-has-block', {
ComponentClass: Component.extend(),
template: '<div>{{hasBlock}}</div>'
template: '<div>{{hasBlock}}</div>',
});

this.registerComponent('yielding-component', {
ComponentClass: Component.extend(),
template: '{{yield (component "component-with-has-block")}}'
template: '{{yield (component "component-with-has-block")}}',
});

this.registerComponent('test-component', {
ComponentClass: Component.extend(),
template: '{{#yielding-component as |componentWithHasBlock|}}<componentWithHasBlock/>{{/yielding-component}}'
template:
'{{#yielding-component as |componentWithHasBlock|}}<componentWithHasBlock/>{{/yielding-component}}',
});

this.render('{{test-component}}');

this.assertText('false');
}

['@test GH#18732 has-block works within a yielded curried component invoked with angle bracket invocation (truthy)']() {
this.registerComponent('component-with-has-block', {
ComponentClass: Component.extend(),
template: '<div>{{hasBlock}}</div>'
template: '<div>{{hasBlock}}</div>',
});

this.registerComponent('yielding-component', {
ComponentClass: Component.extend(),
template: '{{yield (component "component-with-has-block")}}'
template: '{{yield (component "component-with-has-block")}}',
});

this.registerComponent('test-component', {
ComponentClass: Component.extend(),
template: '{{#yielding-component as |componentWithHasBlock|}}<componentWithHasBlock></componentWithHasBlock>{{/yielding-component}}'
template:
'{{#yielding-component as |componentWithHasBlock|}}<componentWithHasBlock></componentWithHasBlock>{{/yielding-component}}',
});

this.render('{{test-component}}');

this.assertText('true');
}
}
Expand Down

0 comments on commit a125917

Please sign in to comment.