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

Commit 6d04246

Browse files
committed
work around fir jasmine 2.7+
1 parent 918032e commit 6d04246

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

karma-shared.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ module.exports = function(config, specificOptions) {
183183

184184
config.logLevel = config.LOG_DEBUG;
185185
// Karma (with socket.io 1.x) buffers by 50 and 50 tests can take a long time on IEs;-)
186-
config.browserNoActivityTimeout = 180000;
186+
config.browserNoActivityTimeout = 120000;
187187

188188
config.browserStack.build = buildLabel;
189189
config.browserStack.startTunnel = false;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"jasmine-node": "^2.0.0",
6262
"jasmine-reporters": "^2.2.0",
6363
"jquery": "^3.2.1",
64-
"karma": "^1.7.0",
64+
"karma": "^2.0.0",
6565
"karma-browserstack-launcher": "^1.2.0",
6666
"karma-chrome-launcher": "^2.1.1",
6767
"karma-firefox-launcher": "^1.0.1",

test/AngularSpec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ describe('angular', function() {
10231023
});
10241024

10251025

1026-
xdescribe('csp', function() {
1026+
describe('csp', function() {
10271027

10281028
function mockCspElement(cspAttrName, cspAttrValue) {
10291029
return spyOn(document, 'querySelector').and.callFake(function(selector) {
@@ -1035,10 +1035,13 @@ describe('angular', function() {
10351035

10361036
}
10371037

1038-
var originalFunction;
1038+
var originalPrototype = window.Function.prototype;
10391039

10401040
beforeEach(function() {
10411041
spyOn(window, 'Function');
1042+
// Jasmine 2.7+ doesn't support spying on Function, so we have restore the prototype
1043+
// as Jasmine will use Function internally
1044+
window.Function.prototype = originalPrototype;
10421045
});
10431046

10441047
afterEach(function() {

0 commit comments

Comments
 (0)