Skip to content

Commit

Permalink
added needed assert.expect() calls to because of nested assert.strict…
Browse files Browse the repository at this point in the history
…Equal() calls
  • Loading branch information
michaelchadwick committed Nov 7, 2024
1 parent eafc54b commit d425132
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ module('Integration | Component | fade-text', function (hooks) {
});

test('it fades tall text given as component argument', async function (assert) {
assert.expect(5);
this.set('longHtml', this.longHtml);

this.set('expanded', false);
this.set('onExpandAll', (isExpanded) => {
this.set('expanded', isExpanded);
assert.strictEqual(this.expanded, isExpanded);
});
await render(
hbs`<FadeText @text={{this.longHtml}} @expanded={{this.expanded}} @onExpandAll={{this.onExpandAll}} />`,
Expand All @@ -80,10 +82,13 @@ module('Integration | Component | fade-text', function (hooks) {
});

test('it fades tall text given as block', async function (assert) {
assert.expect(5);
this.set('longHtml', this.longHtml);

this.set('expanded', false);
this.set('onExpandAll', (isExpanded) => {
this.set('expanded', isExpanded);
assert.strictEqual(this.expanded, isExpanded);
});

await render(hbs`<FadeText
Expand Down Expand Up @@ -126,12 +131,15 @@ module('Integration | Component | fade-text', function (hooks) {
});

test('expand/collapse', async function (assert) {
assert.expect(12);
const longText = `An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades. An objective description so long that it fades.`;
this.set('longHtml', this.longHtml);
this.set('longText', longText);

this.set('expanded', false);
this.set('onExpandAll', (isExpanded) => {
this.set('expanded', isExpanded);
assert.strictEqual(this.expanded, isExpanded);
});
await render(
hbs`<FadeText @text={{this.longHtml}} @expanded={{this.expanded}} @onExpandAll={{this.onExpandAll}} />`,
Expand Down

0 comments on commit d425132

Please sign in to comment.