Skip to content

Commit 55945e6

Browse files
committed
chore: update jest version
1 parent 0a11979 commit 55945e6

File tree

3 files changed

+744
-364
lines changed

3 files changed

+744
-364
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"eslint-config-prettier": "^8.3.0",
126126
"eslint-plugin-prettier": "^3.4.1",
127127
"gen-esm-wrapper": "^1.1.3",
128-
"jest": "^28.1.3",
128+
"jest": "^29.7.0",
129129
"json-schema-to-typescript": "^11.0.1",
130130
"node-stdlib-browser": "^1.2.0",
131131
"prettier": "^2.3.2",

src/__tests__/unit/gateway-interactions.loader.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('WarpGatewayInteractionsLoader -> load', () => {
9797
it('should be called with correct params', async () => {
9898
const loader = getLoader();
9999
await loader.load(contractId, fromBlockHeight, toBlockHeight);
100-
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true`);
100+
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true`, undefined);
101101
});
102102
it('should be called accordingly to the amount of pages', async () => {
103103
const fetchMock = jest.spyOn(global, 'fetch').mockImplementation(
@@ -110,7 +110,7 @@ describe('WarpGatewayInteractionsLoader -> load', () => {
110110
);
111111
const loader = getLoader();
112112
await loader.load(contractId, fromBlockHeight, toBlockHeight);
113-
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true`);
113+
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true`, undefined);
114114
/*expect(fetchMock).toBeCalledWith(`${baseUrl}&page=2&fromSdk=true`);
115115
expect(fetchMock).toBeCalledWith(`${baseUrl}&page=3&fromSdk=true`);
116116
expect(fetchMock).toBeCalledWith(`${baseUrl}&page=4&fromSdk=true`);
@@ -120,12 +120,12 @@ describe('WarpGatewayInteractionsLoader -> load', () => {
120120
it('should be called with confirmationStatus set to "confirmed"', async () => {
121121
const loader = getLoader({ confirmed: true });
122122
await loader.load(contractId, fromBlockHeight, toBlockHeight);
123-
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true&confirmationStatus=confirmed`);
123+
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true&confirmationStatus=confirmed`, undefined);
124124
});
125125
it('should be called with confirmationStatus set to "not_corrupted"', async () => {
126126
const loader = getLoader({ notCorrupted: true });
127127
await loader.load(contractId, fromBlockHeight, toBlockHeight);
128-
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true&confirmationStatus=not_corrupted`);
128+
expect(fetchMock).toBeCalledWith(`${baseUrl}&fromSdk=true&confirmationStatus=not_corrupted`, undefined);
129129
});
130130
it('should throw an error in case of timeout', async () => {
131131
jest.spyOn(global, 'fetch').mockImplementation(() => Promise.reject({ status: 504, ok: false }));

0 commit comments

Comments
 (0)