fix: don't call onAllChangesDone on checkNoChanges

This commit is contained in:
Misko Hevery
2015-05-18 21:29:23 -07:00
committed by Victor Berchet
parent 7643d979c7
commit a664f5a6de
2 changed files with 17 additions and 1 deletions

View File

@ -339,6 +339,22 @@ export function main() {
expect(directive1.onChangesDoneCalled).toBe(true);
expect(directive2.onChangesDoneCalled).toBe(true);
// reset directives
directive1.onChangesDoneCalled = false;
directive2.onChangesDoneCalled = false;
// Verify that checking should not call them.
cd.checkNoChanges();
expect(directive1.onChangesDoneCalled).toBe(false);
expect(directive2.onChangesDoneCalled).toBe(false);
// re-verify that changes are still detected
cd.detectChanges();
expect(directive1.onChangesDoneCalled).toBe(true);
expect(directive2.onChangesDoneCalled).toBe(true);
});