Added definition for $interval.flush([millis])

ngMock's $interval includes a flush method that takes an optional maximum number of milliseconds to advance the interval, and returns the number of milliseconds that were actually advanced.
This commit is contained in:
Spencer Williams
2014-06-24 11:51:35 -04:00
parent 6f3946e020
commit aa2b85affb

View File

@@ -61,6 +61,15 @@ declare module ng {
flushNext(expectedDelay?: number): void;
verifyNoPendingTasks(): void;
}
///////////////////////////////////////////////////////////////////////////
// IntervalService
// see http://docs.angularjs.org/api/ngMock.$interval
// Augments the original service
///////////////////////////////////////////////////////////////////////////
interface IIntervalService {
flush(millis?: number): number;
}
///////////////////////////////////////////////////////////////////////////
// LogService