feat(FakeAsync): check pending timers at the end of fakeAsync in Dart

Made possible with quiver 0.21.4
This commit is contained in:
Victor Berchet
2015-05-29 08:20:48 +02:00
parent 31a3a19dac
commit 53694eb64a
4 changed files with 15 additions and 18 deletions
@@ -158,15 +158,11 @@ export function main() {
}));
it('should throw an error on dangling timers', () => {
// TODO(vicb): https://github.com/google/quiver-dart/issues/248
if (IS_DARTIUM) return;
expect(() => { fakeAsync(() => { TimerWrapper.setTimeout(() => {}, 10); })(); })
.toThrowError('1 timer(s) still in the queue.');
});
it('should throw an error on dangling periodic timers', () => {
// TODO(vicb): https://github.com/google/quiver-dart/issues/248
if (IS_DARTIUM) return;
expect(() => { fakeAsync(() => { TimerWrapper.setInterval(() => {}, 10); })(); })
.toThrowError('1 periodic timer(s) still in the queue.');
});