Adjust formatting

This commit is contained in:
Blade Barringer
2015-08-31 20:35:23 -05:00
parent f4ca8bb78d
commit 1d8b10dc99

View File

@@ -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;
}));
});