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

Commit c68357d

Browse files
gonengarNarretz
authored andcommitted
docs(guide/Unit Testing): fixing the example for testing filter.
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
1 parent eaf6981 commit c68357d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/content/guide/unit-testing.ngdoc

+5
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ myModule.filter('length', function() {
260260
});
261261

262262
describe('length filter', function() {
263+
264+
beforeEach(inject(function(_$filter_){
265+
$filter= _$filter_;
266+
}));
267+
263268
it('returns 0 when given null', function() {
264269
var length = $filter('length');
265270
expect(length(null)).toEqual(0);

0 commit comments

Comments
 (0)