ng-easy-inject

0.3.1 • Public • Published

ng-easy-inject

Build Status NPM package

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.

Package Sidebar

Install

npm i ng-easy-inject

Weekly Downloads

6

Version

0.3.1

License

ISC

Last publish

Collaborators

  • nicktomlin