0.0.2 • Published 8 years ago

chai-angular-injectable v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

chai-angular-injectable

Check a function can be safely used with Angular 1 dependency injector.

Support inline Array annotation and property annotation.

Install

npm install --save-dev mocha chai chai-angular-injectable

Usage

Register the plugin:

const chai = require('chai');
const injectableChai = require('./index.js');

chai.use(injectableChai);

Test your farctory, service and controllers:

var SomeCtrl = ['foo', function(foo) {}];
var fooFactory = function($log) {};

fooFactory.$inject = ['$log'];

describe('SomeCtrl', function() {

  it('should be injectable', function() {
    expect(SomeCtrl).to.be.injectable;
  });

});

describe('fooFactory', function() {

  it('should be injectable', function() {
    expect(fooFactory).to.be.injectable;
  });

});
0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago