diff --git a/Gruntfile.js b/Gruntfile.js index 14077d78..e50595cd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -40,11 +40,17 @@ module.exports = function(grunt) { jasmine = new Jasmine({jasmineCore: jasmineCore}); jasmine.loadConfigFile('./spec/support/jasmine.json'); - jasmine.onComplete(function(passed) { - done(passed); - }); - jasmine.execute(); + jasmine.exitOnCompletion = false; + jasmine.execute().then( + result => { + done(result.overallStatus === 'passed'); + }, + err => { + console.error(err); + exit(1); + } + ); } ); diff --git a/package.json b/package.json index 84dd9372..093c77fd 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "grunt-contrib-concat": "^1.0.1", "grunt-css-url-embed": "^1.11.1", "grunt-sass": "^3.0.2", - "jasmine": "^3.4.0", + "jasmine": "github:jasmine/jasmine-npm#main", "jasmine-browser-runner": "github:jasmine/jasmine-browser#main", "jsdom": "^15.0.0", "load-grunt-tasks": "^4.0.0", diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index afff7737..a4aaa390 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -465,7 +465,7 @@ describe('Env integration', function() { var global = { setTimeout: function(fn, delay) { - setTimeout(fn, delay); + return setTimeout(fn, delay); }, clearTimeout: function(fn, delay) { clearTimeout(fn, delay); @@ -1018,7 +1018,7 @@ describe('Env integration', function() { var globalSetTimeout = jasmine .createSpy('globalSetTimeout') .and.callFake(function(cb, t) { - setTimeout(cb, t); + return setTimeout(cb, t); }), delayedFunctionForGlobalClock = jasmine.createSpy( 'delayedFunctionForGlobalClock' @@ -1033,7 +1033,7 @@ describe('Env integration', function() { setTimeout: globalSetTimeout, clearTimeout: clearTimeout, setImmediate: function(cb) { - setTimeout(cb, 0); + return setTimeout(cb, 0); } } }); @@ -1108,7 +1108,7 @@ describe('Env integration', function() { setInterval: setInterval, clearInterval: clearInterval, setImmediate: function(cb) { - realSetTimeout(cb, 0); + return realSetTimeout(cb, 0); } } }); @@ -2258,7 +2258,7 @@ describe('Env integration', function() { it('reports errors that occur during loading', function(done) { var global = { setTimeout: function(fn, delay) { - setTimeout(fn, delay); + return setTimeout(fn, delay); }, clearTimeout: function(fn, delay) { clearTimeout(fn, delay); @@ -2315,7 +2315,7 @@ describe('Env integration', function() { var originalOnerror = jasmine.createSpy('original onerror'); var global = { setTimeout: function(fn, delay) { - setTimeout(fn, delay); + return setTimeout(fn, delay); }, clearTimeout: function(fn, delay) { clearTimeout(fn, delay); @@ -2516,7 +2516,7 @@ describe('Env integration', function() { it('is "failed"', function(done) { var global = { setTimeout: function(fn, delay) { - setTimeout(fn, delay); + return setTimeout(fn, delay); }, clearTimeout: function(fn, delay) { clearTimeout(fn, delay); @@ -2774,10 +2774,6 @@ describe('Env integration', function() { }); it('provides custom equality testers to async matchers', function(done) { - if (jasmine.getEnv().skipBrowserFlake) { - jasmine.getEnv().skipBrowserFlake(); - } - jasmine.getEnv().requirePromises(); var specDone = jasmine.createSpy('specDone'); diff --git a/src/html/_HTMLReporter.scss b/src/html/_HTMLReporter.scss index d2d58b0d..dc06ff95 100644 --- a/src/html/_HTMLReporter.scss +++ b/src/html/_HTMLReporter.scss @@ -1,3 +1,5 @@ +@use "sass:math"; + $line-height: 14px; $margin-unit: 14px; @@ -117,7 +119,7 @@ body { li { display: inline-block; - height: ($line-height / 2) + 3; + height: math.div($line-height, 2) + 3; width: $line-height; font-size: 16px; @@ -132,7 +134,7 @@ body { } &.jasmine-failed { - line-height: ($line-height / 2) + 2; + line-height: math.div($line-height, 2) + 2; &:before { color: $failing-color; @@ -284,8 +286,8 @@ body { padding-left: 0; &.jasmine-suite { - margin-top: $margin-unit/2; - margin-bottom: $margin-unit/2 + margin-top: math.div($margin-unit, 2); + margin-bottom: math.div($margin-unit, 2) } }