0.3.1 • Published 9 years ago

ng-easy-inject v0.3.1

Weekly downloads
28
License
ISC
Repository
github
Last release
9 years ago

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.