Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf1acf7

Browse files
committed
test($): fix jasmine syntax
1 parent fdaf4d5 commit bf1acf7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/ng/documentSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ describe('$$isDocumentHidden', function() {
3838
var spy = spyOn(document, 'addEventListener').andCallThrough();
3939

4040
inject(function($$isDocumentHidden, $document) {
41-
expect(spy.calls.mostRecent.args[0]).toBe('visibilitychange');
42-
expect(spy.calls.mostRecent.args[1]).toEqual(jasmine.any(Function));
41+
expect(spy.mostRecentCall().args[0]).toBe('visibilitychange');
42+
expect(spy.mostRecentCall().args[1]).toEqual(jasmine.any(Function));
4343
expect($$isDocumentHidden()).toBeFalsy(); // undefined in browsers that don't support visibility
4444
});
4545

@@ -50,8 +50,8 @@ describe('$$isDocumentHidden', function() {
5050

5151
inject(function($$isDocumentHidden, $rootScope) {
5252
$rootScope.$destroy();
53-
expect(spy.calls.mostRecent.args[0]).toBe('visibilitychange');
54-
expect(spy.calls.mostRecent.args[1]).toEqual(jasmine.any(Function));
53+
expect(spy.mostRecentCall().args[0]).toBe('visibilitychange');
54+
expect(spy.mostRecentCall().args[1]).toEqual(jasmine.any(Function));
5555
});
5656
});
5757
});

0 commit comments

Comments
 (0)