angularjs - Unexpected Request: GET using grunt-angular-templates -
trying use generator-cg-angular. testing directives "error: unexpected request: ecosystem/job/directive/configkey/configkey.html" can fix using html2js, according cgross shouldn't need to. says don't have httpbackend configured pass through requests templates. can't figure out i'm doing wrong.
more info here: https://github.com/cgross/generator-cg-angular/issues/78
code:
describe('directive: configkey', function () { beforeeach(module('app')); var scope, ctrl, new_key; beforeeach(inject(function ($rootscope, $controller) { scope = $rootscope.$new(); ctrl = $controller('configkeyctrl', { $scope:scope }); new_key = { edit:true }; scope.data = angular.copy(data); })); it('should highlight added keys', function () { scope.key.change = 'add'; scope.savekey(); scope.$digest(); expect(elem.hasclass('alert-success')).tobe(true); }); });
my problem in karam's configuration. ngtemplate's out file not being included in karma's file list. add '<%= ngtemplates.main.dest %>' karam:options:files
files: [ '<%= dom_munger.data.appjs %>', '<%= ngtemplates.main.dest %>', // added 1 'bower_components/angular-mocks/angular-mocks.js', 'directive/**/*.html', createfolderglobs(['*-spec.js']) ],
Comments
Post a Comment