Extract out deployment rollout and add tests

This commit is contained in:
Sam Chow 2018-08-28 13:44:58 -04:00
parent 128cf0a28d
commit a6ffe49cba
5 changed files with 140 additions and 72 deletions

View file

@ -1,10 +1,13 @@
export interface AngularPollChannel {
create(scope: { '$on': Function },
requester: (boolean) => void, // function that receives a callback to continue or halt polling
opt_sleeptime?: number
): PollHandle,
create: PollConstructor
}
type PollConstructor = (scope: MockAngularScope, requester: ShouldContinueCallback, opt_sleeptime?: number) => PollHandle;
type MockAngularScope = {
'$on': Function
};
type ShouldContinueCallback = (boolean) => void;
export interface PollHandle {
start(opt_skipFirstCall?: boolean): void,
stop(): void,