Mocking angularjs and typescript


First of all, lets get some details straight,

1. ngmock is for mocking angularjs internal components like $scope, $http and other services and that's all it does.

2. mocking typescript, you gotta use something like typemoq. Probably a good place to start as it support npm, bower and nuget out of the box. But you still need to create dummy mock (
base instance of your interface - which is kinda drag! :(

In fact if you're going to use something like typemoq, you end up writing manual mock object (literally typing out and implementing the required interface). Perhaps better to use jasmine spy.

Let me know what you're thoughts are on this.












Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm