tennisgent / quickmock

quickmock is an simple service for automatically injecting mocks into your AngularJS unit tests using Jasmine or Mocha
http://tennisgent.github.io/quickmock
34 stars 14 forks source link

Directives that require sibling directives #3

Open tennisgent opened 9 years ago

tennisgent commented 9 years ago

There is no way to mock a directive that is required by another directive. Need to provide a syntax for mocking directives to test other directives that use them in isolation.

Something like:

.mockDirective('myElement', function(){
    return { restrict: 'E' };
});

They have to have a controller of some kind, so need to make sure there is a noop controller.

Thanks to @KaidenR for finding this issue :+1: