JLBoor/generator-jlb-angular

View on GitHub
directive/templates/complex/directive-spec.js

Summary

Maintainability
A
2 hrs
Test Coverage
describe('<%= _.camelize(name) %>', function() {

  beforeEach(module('<%= appname %>'));

  var scope,compile;

  beforeEach(inject(function($rootScope,$compile) {
    scope = $rootScope.$new();
    compile = $compile;
  }));

  it('should ...', function() {

    /* 
    To test your directive, you need to create some html that would use your directive,
    send that through compile() then compare the results.

    var element = compile('<div mydirective name="name">hi</div>')(scope);
    expect(element.text()).toBe('hello, world');
    */

  });
});