Created
November 14, 2017 18:48
-
-
Save cakeinpanic/cc9c939705d2df98c6f36aadc99baf03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/angular/angular/issues/10127#issuecomment-247873713 | |
it('should run async test with successful delayed Observable', fakeAsync(() => { | |
let actuallyDone = false; | |
let currentTime = 0; | |
spyOn(Scheduler.async, 'now').and.callFake(() => currentTime); | |
let source = Observable.of(true).delay(10); | |
source.subscribe(() => { | |
actuallyDone = true; | |
}); | |
currentTime = 10; | |
tick(10); | |
expect(actuallyDone).toEqual(true); | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment