Skip to content

Commit

Permalink
fix: improve codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Jan 3, 2019
1 parent 2b72c8c commit df87f3d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/empty/nz-empty.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ describe('nz-empty', () => {
// expect(componentEl.tagName).toBe('NZ-EMPTY-TEST-CUSTOM');
// expect(componentEl.innerText).toBe(`I'm in component list`);
}));

it('should raise error when set a invalid default value', () => {
expect(() => {
testComponent.changeToInvalid();
fixture.detectChanges();
tick();
fixture.detectChanges();
}).toThrowError();
});
});

/**
Expand Down Expand Up @@ -286,6 +295,10 @@ export class NzEmptyTestServiceComponent {
changeToComponent(): void {
this.emptyService.setDefaultEmptyContent(NzEmptyTestCustomComponent);
}

changeToInvalid(): void {
this.emptyService.setDefaultEmptyContent(false as any);
}
}

@Component({
Expand Down

0 comments on commit df87f3d

Please sign in to comment.