Don't spy on getGlobal

This commit is contained in:
Steve Gravrock
2025-10-19 09:58:52 -07:00
parent 4201fd848f
commit 020dffd504
4 changed files with 24 additions and 38 deletions

View File

@@ -1114,6 +1114,8 @@ describe('Env integration', function() {
global: {
setTimeout: globalSetTimeout,
clearTimeout: clearTimeout,
addEventListener() {},
removeEventListener() {},
queueMicrotask: function(fn) {
queueMicrotask(fn);
}
@@ -1188,6 +1190,8 @@ describe('Env integration', function() {
clearTimeout: clearTimeout,
setInterval: setInterval,
clearInterval: clearInterval,
addEventListener() {},
removeEventListener() {},
queueMicrotask: function(fn) {
queueMicrotask(fn);
}
@@ -2777,10 +2781,9 @@ describe('Env integration', function() {
queueMicrotask(fn);
}
};
spyOn(jasmineUnderTest, 'getGlobal').and.returnValue(global);
env.cleanup_();
env = new privateUnderTest.Env();
env = new privateUnderTest.Env({ global });
const reporter = jasmine.createSpyObj('reporter', [
'jasmineDone',
'suiteDone',