diff --git a/test/spec/directives/focus-element.directive.js b/test/spec/directives/focus-element.directive.js index a67af9bc92..718d0efed4 100644 --- a/test/spec/directives/focus-element.directive.js +++ b/test/spec/directives/focus-element.directive.js @@ -15,19 +15,16 @@ describe('focusElement Directive', function() { scope.$digest(); })); - it('places focus on the element it is applied to when the expression it binds to evaluates to true', - inject(function($timeout) { - var focusSpy = sandbox.spy(); + it('places focus on the element it is applied to when the expression it binds to evaluates to true', inject(function($timeout) { + var focusSpy = sandbox.spy(); - elementToFocus.appendTo(document.body); - elementToFocus.on('focus', focusSpy); - scope.focusThisLink = true; - scope.$digest(); - - $timeout.flush(); - expect(document.activeElement.dataset.focusElement).to.eql("focusThisLink"); - expect(focusSpy).to.have.been.called; - }) - ); + elementToFocus.appendTo(document.body); + elementToFocus.on('focus', focusSpy); + scope.focusThisLink = true; + scope.$digest(); + $timeout.flush(); + expect(document.activeElement.dataset.focusElement).to.eql("focusThisLink"); + expect(focusSpy).to.have.been.called; + })); });