Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(guide/Unit Testing): fixing the example for testing filter.
Browse files Browse the repository at this point in the history
Hi there,
It seems that in the example which starts at line 256 there needs to
be an injection for $filter as in the previous example.

Closes #11410
  • Loading branch information
gonengar authored and Narretz committed Apr 27, 2015
1 parent 6c632d9 commit c075126
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/content/guide/unit-testing.ngdoc
Expand Up @@ -260,6 +260,11 @@ myModule.filter('length', function() {
});

describe('length filter', function() {

beforeEach(inject(function(_$filter_){
$filter= _$filter_;
}));

it('returns 0 when given null', function() {
var length = $filter('length');
expect(length(null)).toEqual(0);
Expand Down

0 comments on commit c075126

Please sign in to comment.