Skip to content

Commit f047ece

Browse files
committed
tests: fixed txProcessor tests
1 parent 55ac900 commit f047ece

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

packages/wallet-service/tests/txProcessor.test.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,14 @@ describe('NFT metadata updating', () => {
472472
() => '',
473473
);
474474
expect(spyUpdateMetadata).toHaveBeenCalledTimes(1);
475-
expect(spyUpdateMetadata).toHaveBeenCalledWith(nftCreationTx.tx_id, { id: nftCreationTx.tx_id, nft: true }, txProcessor.CREATE_NFT_MAX_RETRIES, logger);
475+
expect(spyUpdateMetadata).toHaveBeenCalledWith(nftCreationTx.tx_id, { id: nftCreationTx.tx_id, nft: true }, txProcessor.CREATE_NFT_MAX_RETRIES, expect.objectContaining({
476+
error: expect.any(Function),
477+
info: expect.any(Function),
478+
warn: expect.any(Function),
479+
defaultMeta: {
480+
requestId: expect.any(String)
481+
},
482+
}));
476483
expect(result).toStrictEqual({ success: true });
477484
});
478485

@@ -495,7 +502,14 @@ describe('NFT metadata updating', () => {
495502
message: `onNewNftEvent failed for token ${nftCreationTx.tx_id}`,
496503
};
497504
expect(result).toStrictEqual(expectedResult);
498-
expect(spyCreateOrUpdate).toHaveBeenCalledWith(nftCreationTx.tx_id, txProcessor.CREATE_NFT_MAX_RETRIES, logger);
505+
expect(spyCreateOrUpdate).toHaveBeenCalledWith(nftCreationTx.tx_id, txProcessor.CREATE_NFT_MAX_RETRIES, expect.objectContaining({
506+
error: expect.any(Function),
507+
info: expect.any(Function),
508+
warn: expect.any(Function),
509+
defaultMeta: {
510+
requestId: expect.any(String)
511+
},
512+
}));
499513

500514
spyCreateOrUpdate.mockReset();
501515
spyCreateOrUpdate.mockRestore();

0 commit comments

Comments
 (0)