diff --git a/test/__mocks__/consts.ts b/test/__mocks__/consts.ts index 5669fd2..00aa0c3 100644 --- a/test/__mocks__/consts.ts +++ b/test/__mocks__/consts.ts @@ -20,3 +20,4 @@ export const JSON_METADATA_UNIT_TESTS_OUTPUT_NEW_METADATA_FOLDER_PATH = 'test/unit/output/newMetadata'; export const LONG_E2E_TIMEOUT = 25000; +export const MIRROR_NODE_DELAY = 5000; diff --git a/test/e2e/increaseNFTSupplyFunctionE2E.test.ts b/test/e2e/increaseNFTSupplyFunctionE2E.test.ts index 3408430..3cb96a9 100644 --- a/test/e2e/increaseNFTSupplyFunctionE2E.test.ts +++ b/test/e2e/increaseNFTSupplyFunctionE2E.test.ts @@ -1,6 +1,6 @@ import { NftId, PrivateKey, TokenId, TokenNftInfoQuery } from '@hashgraph/sdk'; import { nftSDK, operatorPrivateKey } from './e2eConsts'; -import { LONG_E2E_TIMEOUT } from '../__mocks__/consts'; +import { LONG_E2E_TIMEOUT, MIRROR_NODE_DELAY } from '../__mocks__/consts'; afterAll(async () => { nftSDK.client.close(); @@ -28,7 +28,7 @@ describe('increaseNFTSupply function e2e', () => { .execute(nftSDK.client); //wait for the collection and nfts to be available on mirror node - await new Promise((r) => setTimeout(r, 5000)); + await new Promise((r) => setTimeout(r, MIRROR_NODE_DELAY)); const increaseSupplyResult = await nftSDK.increaseNFTSupply({ nftId: nftInfo[0].nftId, diff --git a/test/unit/increaseNFTSupply.test.ts b/test/unit/increaseNFTSupply.test.ts index ad562b7..7c3e2b8 100644 --- a/test/unit/increaseNFTSupply.test.ts +++ b/test/unit/increaseNFTSupply.test.ts @@ -1,7 +1,7 @@ +import { Client, PrivateKey, TokenId } from '@hashgraph/sdk'; import axios from 'axios'; import { increaseNFTSupply } from '../../src/functions/increaseNFTSupply'; import { IncreaseNFTSupplyType } from '../../src/types/mintToken'; -import { Client, LedgerId, PrivateKey, TokenId } from '@hashgraph/sdk'; import { validatePropsForIncreaseNFTSupply } from '../../src/utils/validateProps'; @@ -38,7 +38,7 @@ describe('increaseNFTSupply', () => { const generatedSupplyKey = PrivateKey.generate(); const mockIncreaseNFTSupplyType: IncreaseNFTSupplyType = { - client: { ledgerId: LedgerId.TESTNET } as Client, + client: {} as Client, network: 'testnet', nftId: mockNftId, amount: 10,