AAE-30882 Remove superagent for fetch (#11856)

* [AAE-30882] - Remove superagent for fetch

* [AAE-30882] - Fixing comments

* [AAE-30882] - fixde failing unit tests

* [AAE-30882] - fixde failing unit tests

* [AAE-30882] - fixd sonarcloud comment
This commit is contained in:
Vito Albano
2026-05-20 14:19:27 +05:30
committed by Anamika Dey
parent 94b9a81570
commit a58fd2e7cc
54 changed files with 2127 additions and 922 deletions
+4 -4
View File
@@ -17,7 +17,7 @@
import assert from 'assert';
import { ProcessAuth } from '../src';
import { SuperagentHttpClient } from '../src/superagentHttpClient';
import { FetchHttpClient } from '../src/fetchHttpClient';
import { BpmAuthMock } from './mockObjects';
describe('Bpm Auth test', () => {
@@ -256,16 +256,16 @@ describe('Bpm Auth test', () => {
let setCsrfTokenCalled = false;
beforeEach(() => {
originalMethod = SuperagentHttpClient.prototype.setCsrfToken;
originalMethod = FetchHttpClient.prototype.setCsrfToken;
setCsrfTokenCalled = false;
SuperagentHttpClient.prototype.setCsrfToken = () => {
FetchHttpClient.prototype.setCsrfToken = () => {
setCsrfTokenCalled = true;
};
});
afterEach(() => {
SuperagentHttpClient.prototype.setCsrfToken = originalMethod;
FetchHttpClient.prototype.setCsrfToken = originalMethod;
setCsrfTokenCalled = false;
});