Questions tagged [ngdescribe]

5 questions
10
votes
1 answer

Using ng-describe for end-to-end testing with protractor

I've recently discovered an awesome ng-describe package that makes writing unit tests for AngularJS applications very transparent by abstracting away all of the boilerplate code you have to remember/look up and write in order to load, inject, mock…
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
1
vote
1 answer

AngularJS Custom Validation Directive Unit Testing : model value is undefined

I have a directive that adds a validator on my inputs to be used by ng-messages : angular.module('app.module.submodule').directive('dateFormatFr', function () { return { require: 'ngModel', link: linkValidator …
Célia
  • 279
  • 3
  • 11
1
vote
1 answer

ng-describe/Angular/Karma unit testing: Compiling a directive with a required controller using ng-describe's setupControllers

I'm writing Karma unit tests for angularJS using ng-describe (which I must say, is awesome). I've got two directives. I want to test directive testing which requires somethingController. code: angular.module('A', []) .directive('testing',…
1
vote
0 answers

ngDescribe Won't Complete Second Spec

I'm having trouble with a chained spec when using ngDescribe. The second spec never finishes and times out. If I comment out the first spec, the second spec completes successfully. So, I know each spec is valid and works. Here is the whole test…
Justin Noel
  • 5,945
  • 10
  • 44
  • 59
0
votes
0 answers

$httpBackend doesn't seem to be flushing requests

I am testing my Angular app using ngDescribe. I don't think ngDescribe should be too much of a problem here, as it's just managing dependency injection for me. I first began to attempt my test the way the ngDescribe docs say, in the code below I…
Justin
  • 2,265
  • 4
  • 15
  • 21