Skip to content

Commit

Permalink
test(module:empty): refactor test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jan 17, 2019
1 parent 8995917 commit c5a5113
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/empty/nz-empty.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { By } from '@angular/platform-browser';
import { NzListModule } from '../list';
import { NzEmbedEmptyComponent } from './nz-embed-empty.component';
import { NZ_DEFAULT_EMPTY_CONTENT, NZ_EMPTY_COMPONENT_NAME } from './nz-empty-config';
import { getEmptyContentTypeError } from './nz-empty-error';
import { NzEmptyComponent } from './nz-empty.component';
import { NzEmptyModule } from './nz-empty.module';
import { NzEmptyService } from './nz-empty.service';
Expand Down Expand Up @@ -157,10 +158,7 @@ describe('nz-empty', () => {
it('should raise error when set a invalid default value', () => {
expect(() => {
testComponent.changeToInvalid();
fixture.detectChanges();
tick();
fixture.detectChanges();
}).toThrowError();
}).toThrowError(getEmptyContentTypeError(false).message);
});

it('should support string, template and component', fakeAsync(() => {
Expand Down

0 comments on commit c5a5113

Please sign in to comment.