mercredi 8 juillet 2015

Angular test fail "minErr"

I'm unable to figure out what I'm doing wrong with this test. It is my first test for the project.

describe('Controller: landingCtrl', function () {
  var scope;

  beforeEach(angular.mock.module('myWebApp'));

  beforeEach(angular.mock.inject(function($rootScope, $controller) {
    scope = $rootScope.$new();
    scope.filters = {
      date: 'This Week'
    };

    $controller('landingCtrl', {
      $scope: scope
    });
  }));

  it('dateFilter should return true', function () {
    expect(true).toBe(true);
  });
});

This is the output:

Firefox 34.0.0 (Windows) Controller: landingCtrl dateFilter should return true FAILED
    minErr/<@app/bower_components/angular/angular.js:63:12
    loadModules/<@Capp/bower_components/angular/angular.js:4138:15
    forEach@app/bower_components/angular/angular.js:323:11
    loadModules@app/bower_components/angular/angular.js:4099:5
    createInjector@app/bower_components/angular/angular.js:4025:11
    workFn@app/bower_components/angular-mocks/angular-mocks.js:2425:44

Aucun commentaire:

Enregistrer un commentaire