Merge pull request #12738 from ersimont/patch-4

Add animate.IAnimateService
This commit is contained in:
Nathan Shively-Sanders
2016-11-23 11:16:25 -08:00
committed by GitHub
+19
View File
@@ -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 {