UNPKG

generator-mycroftx-component

Version:

Yeoman generator and modified generator-ng-component

19 lines (15 loc) 724 B
'use strict' describe 'Directive: <%= cameledName %>', -> # load the directive's module and view beforeEach module '<%= scriptAppName %>' beforeEach module '<%= htmlUrl %>' element = undefined scope = undefined beforeEach inject ($rootScope) -> scope = $rootScope.$new() it 'should make hidden element visible', inject ($compile) -> element = angular.element '<<%= _.dasherize(name) %>></<%= _.dasherize(name) %>>' element = $compile(element) scope scope.$apply()<% if (hasFilter('jasmine')) { %> expect(element.text()).toBe 'this is the <%= cameledName %> directive'<% } if (hasFilter('mocha')) { %> expect(element.text()).to.equal 'this is the <%= cameledName %> directive'<% } %>