Fixed test failures on Safari 8 and 9

This commit is contained in:
Steve Gravrock
2021-04-11 20:32:16 -07:00
parent 113134cdbd
commit 97a46f4560

View File

@@ -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();