ng-easy-inject
v0.3.1
Published
Easily inject angular dependencies in mocha and jasmine tests
Downloads
10
Maintainers
Readme
ng-easy-inject
Easily inject angular dependencies into your unit tests.
// or window.easyInject for non CJS users
// who include a <script> pointed at dist/ng-easy-inject.js
var easyInject = require('ng-easy-inject');
describe('injecting depedencies', function () {
beforeEach(easyInject('$http $q'));
it('is surprisingly easy', function () {
expect(this.$http).to.respondTo('get');
});
});
Compatibility
Tested against mocha and Jasmine 2.x.
Testing
npm i
npm t
Related Projects
bard.js - Includes auto inject functionality and a lot of other useful helpers.