test($$isDocumentHidden): really fix jasmine syntax

This commit is contained in:
Martin Staffa
2016-05-06 17:12:17 +02:00
parent bf1acf7b21
commit d3e123b0a6
+4 -4
View File
@@ -38,8 +38,8 @@ describe('$$isDocumentHidden', function() {
var spy = spyOn(document, 'addEventListener').andCallThrough();
inject(function($$isDocumentHidden, $document) {
expect(spy.mostRecentCall().args[0]).toBe('visibilitychange');
expect(spy.mostRecentCall().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.mostRecentCall().args[0]).toBe('visibilitychange');
expect(spy.mostRecentCall().args[1]).toEqual(jasmine.any(Function));
expect(spy.mostRecentCall.args[0]).toBe('visibilitychange');
expect(spy.mostRecentCall.args[1]).toEqual(jasmine.any(Function));
});
});
});