Skip to content

Commit 9861af9

Browse files
committed
update test
1 parent d34e1b1 commit 9861af9

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

src/lib/checkbox/checkbox.spec.ts

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -152,25 +152,18 @@ describe('MdCheckbox', () => {
152152
testComponent.isChecked = true;
153153
fixture.detectChanges();
154154

155-
fixture.whenStable().then(() => {
156-
fixture.detectChanges();
157-
expect(checkboxInstance.checked).toBe(true);
158-
expect(inputElement.indeterminate).toBe(true);
159-
expect(inputElement.checked).toBe(true);
160-
expect(testComponent.isIndeterminate).toBe(true);
161-
162-
testComponent.isChecked = false;
163-
fixture.detectChanges();
155+
expect(checkboxInstance.checked).toBe(true);
156+
expect(inputElement.indeterminate).toBe(true);
157+
expect(inputElement.checked).toBe(true);
158+
expect(testComponent.isIndeterminate).toBe(true);
164159

165-
fixture.whenStable().then(() => {
166-
fixture.detectChanges();
167-
expect(checkboxInstance.checked).toBe(false);
168-
expect(inputElement.indeterminate).toBe(true);
169-
expect(inputElement.checked).toBe(false);
170-
expect(testComponent.isIndeterminate).toBe(true);
171-
});
172-
});
160+
testComponent.isChecked = false;
161+
fixture.detectChanges();
173162

163+
expect(checkboxInstance.checked).toBe(false);
164+
expect(inputElement.indeterminate).toBe(true);
165+
expect(inputElement.checked).toBe(false);
166+
expect(testComponent.isIndeterminate).toBe(true);
174167
}));
175168

176169
it('should change native element checked when check programmatically', () => {

0 commit comments

Comments
 (0)