Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Sep 5, 2019
1 parent a2d9d2c commit 4ccfc53
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions components/cascader/nz-cascader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,12 @@ describe('cascader', () => {
control.writeValue([]);
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(0);
control.writeValue(0);
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(1);
control.writeValue('');
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(0);
expect(control.getSubmitValue().length).toBe(1);
control.writeValue(['zhejiang']);
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(1);
Expand Down Expand Up @@ -660,9 +663,12 @@ describe('cascader', () => {
control.writeValue([]);
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(0);
control.writeValue(0);
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(1);
control.writeValue('');
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(0);
expect(control.getSubmitValue().length).toBe(1);
control.writeValue(['zhejiang']);
fixture.detectChanges();
expect(control.getSubmitValue().length).toBe(1);
Expand Down

0 comments on commit 4ccfc53

Please sign in to comment.