From 8cadfbd829179621cd9eba415556a6f58b31c544 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Thu, 7 Oct 2021 10:51:06 -0700 Subject: [PATCH] Fixed deprecation warning in spec --- spec/core/EnvSpec.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/core/EnvSpec.js b/spec/core/EnvSpec.js index f0a1f6ce..4825d4b1 100644 --- a/spec/core/EnvSpec.js +++ b/spec/core/EnvSpec.js @@ -832,14 +832,20 @@ describe('Env', function() { it('should reset the topSuite when run twice', function() { jasmine.getEnv().requirePromises(); - spyOn(env.topSuite(), 'reset'); + spyOn(jasmineUnderTest.Suite.prototype, 'reset'); return env .execute() // 1 .then(function() { return env.execute(); // 2 }) .then(function() { - expect(env.topSuite().reset).toHaveBeenCalledOnceWith(); + var id; + expect( + jasmineUnderTest.Suite.prototype.reset + ).toHaveBeenCalledOnceWith(); + id = jasmineUnderTest.Suite.prototype.reset.calls.thisFor(0).id; + expect(id).toBeTruthy(); + expect(id).toEqual(env.topSuite().id); }); }); });