refactor(ChandeDetection): Rename ChangeDetectorRef.markForCheck
BREAKING CHANGE Closes #3403 - ChangeDetectorRef.requestCheck() => ChangeDetectorRef.markForCheck()
This commit is contained in:
committed by
Miško Hevery
parent
b8be4bfaaf
commit
cebd670a8e
@@ -1685,7 +1685,7 @@ class PushCmpWithRef {
|
||||
return "fixed";
|
||||
}
|
||||
|
||||
propagate() { this.ref.requestCheck(); }
|
||||
propagate() { this.ref.markForCheck(); }
|
||||
}
|
||||
|
||||
@Component({selector: 'push-cmp-with-async', changeDetection: ChangeDetectionStrategy.OnPush})
|
||||
|
||||
@@ -73,7 +73,7 @@ main() {
|
||||
c.add(3);
|
||||
flushMicrotasks();
|
||||
|
||||
expect(changeDetectorRef.spy("requestCheck")).toHaveBeenCalledOnce();
|
||||
expect(changeDetectorRef.spy("markForCheck")).toHaveBeenCalledOnce();
|
||||
}));
|
||||
|
||||
it("should return the wrapped value after changing a collection", () {
|
||||
|
||||
@@ -91,7 +91,7 @@ export function main() {
|
||||
ObservableWrapper.callNext(emitter, message);
|
||||
|
||||
TimerWrapper.setTimeout(() => {
|
||||
expect(ref.spy('requestCheck')).toHaveBeenCalled();
|
||||
expect(ref.spy('markForCheck')).toHaveBeenCalled();
|
||||
async.done();
|
||||
}, 0)
|
||||
}));
|
||||
@@ -178,7 +178,7 @@ export function main() {
|
||||
completer.resolve(message);
|
||||
|
||||
TimerWrapper.setTimeout(() => {
|
||||
expect(ref.spy('requestCheck')).toHaveBeenCalled();
|
||||
expect(ref.spy('markForCheck')).toHaveBeenCalled();
|
||||
async.done();
|
||||
}, timer)
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user