Skip to content

Commit 972b6a2

Browse files
gonengarnetman92
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 angular#11410
1 parent c93f8c7 commit 972b6a2

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)