From 97a46f4560a90a74d057a538a4b7faaf83df0b3f Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sun, 11 Apr 2021 20:32:16 -0700 Subject: [PATCH] Fixed test failures on Safari 8 and 9 --- spec/core/integration/EnvSpec.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index e6ccedb2..8607a676 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -2883,6 +2883,8 @@ describe('Env integration', function() { resolve = res; }); + env.configure({ random: false }); + env.describe('a suite', function() { env.it('does not wait', function() { // Note: we intentionally don't return the result of each expectAsync. @@ -2892,6 +2894,12 @@ describe('Env integration', function() { }); }); + env.it('another spec', function(done) { + // This is here to make sure that the async expectation evaluates + // before the Jasmine under test finishes, especially on Safari 8 and 9. + setTimeout(done, 10); + }); + env.addReporter({ specDone: function() { resolve(); @@ -2938,6 +2946,8 @@ describe('Env integration', function() { resolve = res; }); + env.configure({ random: false }); + env.describe('a suite', function() { env.afterAll(function() { // Note: we intentionally don't return the result of expectAsync. @@ -2948,6 +2958,12 @@ describe('Env integration', function() { env.it('is a spec', function() {}); }); + env.it('another spec', function(done) { + // This is here to make sure that the async expectation evaluates + // before the Jasmine under test finishes, especially on Safari 8 and 9. + setTimeout(done, 10); + }); + env.addReporter({ suiteDone: function() { resolve();