Unbekannte Anbieter: $provideProvider angularjs Jasmin

Bin ich immer diese Fehlermeldung: "Fehler: [$Injektor:unpr] Unbekannt-Anbieter: $provideProvider <- $zur Verfügung" stellen. Ich stecken stundenlang googeln um. Ich habe gesehen, viele Beispiele, wo es auf diese Weise getan wird, und ich bin nicht sicher, was zu tun ist.

"use strict";


describe('Controller: ProfileCtrl', function ($provide) {
    //load the controller's module
    var mockProfileFactory;
    beforeEach(function() {
        module('profileUpdate', function($provide) {
            mockProfileFactory = {
                get: function() {
                    id: 16
                }
            };
            $provide.value('Profile', mockProfileFactory);
        });
        var ProfileCtrl;
        var scope;

    inject(function ($controller, $rootScope, $provide) {

        scope = $rootScope.$new();
        ProfileCtrl = $controller('ProfileCtrl', {
            $scope: scope
        });
    });
});

it('should have 3 items', function() {
    var things = scope.range(1,3,1);
    expect(things).toBe(3);
});

});

InformationsquelleAutor user2170878 | 2015-01-03
Schreibe einen Kommentar