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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.1
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.1
    11
  • 0.3.0
    1
  • 0.2.1
    1
  • 0.2.0
    0
  • 0.1.0
    1

Package Sidebar

Install

npm i ng-easy-inject

Weekly Downloads

14

Version

0.3.1

License

ISC

Last publish

Collaborators

  • nicktomlin