Deep clone reporter events

This commit is contained in:
Steve Gravrock
2025-09-20 16:18:56 -07:00
parent d333ecb5b1
commit 6e0342fc8e
3 changed files with 34 additions and 10 deletions

View File

@@ -1598,15 +1598,6 @@ describe('Env integration', function() {
suiteFullNameToId[e.fullName] = e.id;
});
// Clone args to work around Jasmine mutating the result after passing it
// to the reporter event.
// TODO: remove this once Jasmine no longer does that
const clone = structuredClone.bind(globalThis);
reporter.specStarted.calls.saveArgumentsByValue(clone);
reporter.specDone.calls.saveArgumentsByValue(clone);
reporter.specStarted.calls.saveArgumentsByValue(clone);
reporter.suiteDone.calls.saveArgumentsByValue(clone);
env.configure({ random: false });
env.addReporter(reporter);