diff --git a/angular-mocks/index.d.ts b/angular-mocks/index.d.ts index 3c24ed1cf6..8aa172e293 100644 --- a/angular-mocks/index.d.ts +++ b/angular-mocks/index.d.ts @@ -301,6 +301,25 @@ declare module 'angular' { whenPUT(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean), keys?: Object[]): mock.IRequestHandler; } + /////////////////////////////////////////////////////////////////////////// + // AnimateService + // see https://docs.angularjs.org/api/ngMock/service/$animate + /////////////////////////////////////////////////////////////////////////// + module animate { + interface IAnimateService { + + /** + * This method will close all pending animations (both Javascript and CSS) and it will also flush any remaining animation frames and/or callbacks. + */ + closeAndFlush(): void; + + /** + * This method is used to flush the pending callbacks and animation frames to either start an animation or conclude an animation. Note that this will not actually close an actively running animation (see `closeAndFlush()` for that). + */ + flush(): void; + } + } + export module mock { // returned interface by the the mocked HttpBackendService expect/when methods interface IRequestHandler {