import { ManagementClient } from "clients/management" ; param promise return function mockManagementClientVerifyUser ( promise ) { return spyOn ( ManagementClient . prototype , "verifyUser" ) . and . callFake ( promise ) ; } return export function mockManagementClientVerifyUserWithSuccess ( ) { return mockManagementClientVerifyUser ( ( ) => Promise . resolve ( ) ) ; } param err return export function mockManagementClientVerifyUserWithError ( err = new Error ( "verifyUser" ) ) { return mockManagementClientVerifyUser ( ( ) => Promise . reject ( err ) ) ; } param promise return function mockManagementClientChangePassword ( promise ) { return spyOn ( ManagementClient . prototype , "changePassword" ) . and . callFake ( promise ) ; } return export function mockManagementClientChangePasswordWithSuccess ( ) { return mockManagementClientChangePassword ( ( ) => Promise . resolve ( ) ) ; } param err return export function mockManagementClientChangePasswordWithError ( err = new Error ( "changePassword" ) ) { return mockManagementClientChangePassword ( ( ) => Promise . reject ( err ) ) ; }