Skip to content

Commit 3adfe5b

Browse files
Kent C. DoddsNarretz
Kent C. Dodds
authored andcommitted
docs(guide/Unit Testing): add variable declaration to $filter test
The $filter example never declares `$filter` and therefore would add `$filter` to the global namespace. Add variable declaration. Closes angular#12129
1 parent dc04678 commit 3adfe5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/content/guide/unit-testing.ngdoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ myModule.filter('length', function() {
261261

262262
describe('length filter', function() {
263263

264+
var $filter;
265+
264266
beforeEach(inject(function(_$filter_){
265-
$filter= _$filter_;
267+
$filter = _$filter_;
266268
}));
267269

268270
it('returns 0 when given null', function() {

0 commit comments

Comments
 (0)