Skip to content

Commit

Permalink
test(module:typography): add the suffix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jan 7, 2020
1 parent 37ce979 commit c7538d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/typography/nz-typography.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ describe('typography', () => {
const el = componentElement.querySelector('.dynamic') as HTMLParagraphElement;
expect(el.innerText.includes('The suffix.')).toBe(true);
expect(el.innerText.includes('...')).toBe(true);
testComponent.expandable = false;
fixture.detectChanges();
tick(32);
fixture.detectChanges();
expect(el.innerText.endsWith('The suffix.')).toBe(true);
expect(el.innerText.includes('...')).toBe(true);
}

viewport.reset();
Expand Down

0 comments on commit c7538d5

Please sign in to comment.