generator-angular-blueprint
Version:
Yeoman angular generator that allows you to override global templates with your own!
22 lines (16 loc) • 591 B
JavaScript
;
describe('<%= type %>:<%= dashedName %>', function () {
// load the directive's module and view
beforeEach(angular.mock.module('<%= appName %>'));
let element, scope;
// Initialize a mock scope
beforeEach(inject(function ($injector) {
scope = $injector.get('$rootScope').$new();
}));
// compile the element to be tested
it('should be a thing', inject(function ($compile) {
element = angular.element('<<%= dashedName %>></<%= dashedName %>>');
element = $compile(element)(scope);
scope.$apply();
}));
});