Recently i started unit testing on my typescript code using karma-jasmine. After creating and running test case for a service and a simple directive, i created one test case for
I needed to make a mock for facadeService.
Demo mocks.ts
import {IfcFacadeService} from 'filePath'
export const facadeServiceMock: IfcFacadeService {
methodName: (): any => {};
}
To use this mock, import it
Demo .html.spec.ts
import {facadeServiceMock} from 'mockPathName'
beforeEach(()=>{
angular.mock.module(appName), {FacadeService: facadeServiceMock});
})