From 643b786911941682d1c534c169a4300dfe7253ac Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Tue, 16 Jun 2015 00:02:30 -0600 Subject: [PATCH] docs(guide/Unit Testing): update $filter test example The $filter example never declares `$filter` and therefore would add `$filter` to the global namespace. Add variable declaration. --- docs/content/guide/unit-testing.ngdoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/content/guide/unit-testing.ngdoc b/docs/content/guide/unit-testing.ngdoc index 25ffcb9c0c19..e17ca02d4bee 100644 --- a/docs/content/guide/unit-testing.ngdoc +++ b/docs/content/guide/unit-testing.ngdoc @@ -261,8 +261,10 @@ myModule.filter('length', function() { describe('length filter', function() { + var $filter; + beforeEach(inject(function(_$filter_){ - $filter= _$filter_; + $filter = _$filter_; })); it('returns 0 when given null', function() {