Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit eb16611

Browse files
lgalfasopetebacondarwin
authored andcommitted
chore(*): Upgrade to Jasmine 2.4
Highlights: New mechanism to run async tests as Jasmine 2 removed `runs`, `waits` and `waitsFor` The functions `iit`, `ddescribe` and `tthey` were renamed `fit`, `fdescribe` and `fthey` as the originals came from Karma, Karma no longer bundles Jasmine and the new function name comes from Jasmine. Closes #14226
1 parent a4e60cb commit eb16611

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+8402
-12182
lines changed

angularFiles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ var angularFiles = {
205205
"karmaModules": [
206206
'build/angular.js',
207207
'@angularSrcModules',
208+
'test/modules/no_bootstrap.js',
208209
'src/ngScenario/browserTrigger.js',
209210
'test/helpers/*.js',
210211
'test/ngMessageFormat/*.js',

docs/app/test/docsSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("DocsController", function() {
2525

2626
it("should update the Google Analytics with $location.path if currentPage is missing", inject(function($window, $location) {
2727
$window._gaq = [];
28-
spyOn($location, 'path').andReturn('x/y/z');
28+
spyOn($location, 'path').and.returnValue('x/y/z');
2929
$scope.$broadcast('$includeContentLoaded');
3030
expect($window._gaq.pop()).toEqual(['_trackPageview', 'x/y/z']);
3131
}));

docs/app/test/errorsSpec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('errors', function() {
44
// Mock `ngSanitize` module
55
angular.
66
module('ngSanitize', []).
7-
value('$sanitize', jasmine.createSpy('$sanitize').andCallFake(angular.identity));
7+
value('$sanitize', jasmine.createSpy('$sanitize').and.callFake(angular.identity));
88

99
beforeEach(module('errors'));
1010

@@ -103,12 +103,12 @@ describe('errors', function() {
103103

104104

105105
it('should pass the final string through `$sanitize`', function() {
106-
$sanitize.reset();
106+
$sanitize.calls.reset();
107107

108108
var input = 'start https://foo/bar?baz#qux end';
109109
var output = errorLinkFilter(input);
110110

111-
expect($sanitize.callCount).toBe(1);
111+
expect($sanitize).toHaveBeenCalledTimes(1);
112112
expect($sanitize).toHaveBeenCalledWith(output);
113113
});
114114
});
@@ -123,7 +123,7 @@ describe('errors', function() {
123123
beforeEach(module(function($provide) {
124124
$provide.decorator('errorLinkFilter', function() {
125125
errorLinkFilter = jasmine.createSpy('errorLinkFilter');
126-
errorLinkFilter.andCallFake(angular.identity);
126+
errorLinkFilter.and.callFake(angular.identity);
127127

128128
return errorLinkFilter;
129129
});
@@ -142,18 +142,18 @@ describe('errors', function() {
142142

143143

144144
it('should interpolate the contents against `$location.search()`', function() {
145-
spyOn($location, 'search').andReturn({p0: 'foo', p1: 'bar'});
145+
spyOn($location, 'search').and.returnValue({p0: 'foo', p1: 'bar'});
146146

147147
var elem = $compile('<span error-display="foo = {0}, bar = {1}"></span>')($rootScope);
148148
expect(elem.html()).toBe('foo = foo, bar = bar');
149149
});
150150

151151

152152
it('should pass the interpolated text through `errorLinkFilter`', function() {
153-
$location.search = jasmine.createSpy('search').andReturn({p0: 'foo'});
153+
$location.search = jasmine.createSpy('search').and.returnValue({p0: 'foo'});
154154

155155
var elem = $compile('<span error-display="foo = {0}"></span>')($rootScope);
156-
expect(errorLinkFilter.callCount).toBe(1);
156+
expect(errorLinkFilter).toHaveBeenCalledTimes(1);
157157
expect(errorLinkFilter).toHaveBeenCalledWith('foo = foo', '_blank');
158158
});
159159

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy