test($): fix jasmine syntax

This commit is contained in:
Martin Staffa
2016-05-06 16:24:13 +02:00
parent fdaf4d5e27
commit bf1acf7b21
+4 -4
View File
@@ -38,8 +38,8 @@ describe('$$isDocumentHidden', function() {
var spy = spyOn(document, 'addEventListener').andCallThrough();
inject(function($$isDocumentHidden, $document) {
expect(spy.calls.mostRecent.args[0]).toBe('visibilitychange');
expect(spy.calls.mostRecent.args[1]).toEqual(jasmine.any(Function));
expect(spy.mostRecentCall().args[0]).toBe('visibilitychange');
expect(spy.mostRecentCall().args[1]).toEqual(jasmine.any(Function));
expect($$isDocumentHidden()).toBeFalsy(); // undefined in browsers that don't support visibility
});
@@ -50,8 +50,8 @@ describe('$$isDocumentHidden', function() {
inject(function($$isDocumentHidden, $rootScope) {
$rootScope.$destroy();
expect(spy.calls.mostRecent.args[0]).toBe('visibilitychange');
expect(spy.calls.mostRecent.args[1]).toEqual(jasmine.any(Function));
expect(spy.mostRecentCall().args[0]).toBe('visibilitychange');
expect(spy.mostRecentCall().args[1]).toEqual(jasmine.any(Function));
});
});
});