From 399b6131c37ff2acf33f96380f85d51e4623c4b2 Mon Sep 17 00:00:00 2001 From: Kven Ho Date: Tue, 29 Nov 2022 13:16:43 +0800 Subject: [PATCH] Update updatemasternode.test.ts --- .../masternode/updatemasternode.test.ts | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/packages/jellyfish-api-core/__tests__/category/masternode/updatemasternode.test.ts b/packages/jellyfish-api-core/__tests__/category/masternode/updatemasternode.test.ts index 2254cba543..60c4b625a8 100644 --- a/packages/jellyfish-api-core/__tests__/category/masternode/updatemasternode.test.ts +++ b/packages/jellyfish-api-core/__tests__/category/masternode/updatemasternode.test.ts @@ -6,15 +6,6 @@ import { Testing, TestingGroup } from '@defichain/jellyfish-testing' import { RegTestFoundationKeys } from '@defichain/jellyfish-network' describe('Update Masternode', () => { - const masternodeState = [ - 'PRE_ENABLED', - 'ENABLED', - 'PRE_RESIGNED', - 'RESIGNED', - 'PRE_BANNED', - 'BANNED', - 'UNKNOWN' - ] const container = new MasterNodeRegTestContainer() const client = new ContainerAdapterClient(container) @@ -80,14 +71,13 @@ describe('Update Masternode', () => { resignHeight: expect.any(Number), resignTx: expect.any(String), collateralTx: expect.any(String), - state: expect.any(String), + state: 'ENABLED', mintedBlocks: expect.any(Number), ownerIsMine: expect.any(Boolean), localMasternode: expect.any(Boolean), operatorIsMine: expect.any(Boolean), targetMultipliers: expect.any(Object) }) - expect(masternodeState).toContain(masternodesAfter[masternodeId].state) }) it('should updateMasternode operatorAddress with bech32 address', async () => { @@ -119,14 +109,13 @@ describe('Update Masternode', () => { resignHeight: expect.any(Number), resignTx: expect.any(String), collateralTx: expect.any(String), - state: expect.any(String), + state: 'ENABLED', mintedBlocks: expect.any(Number), ownerIsMine: expect.any(Boolean), localMasternode: expect.any(Boolean), operatorIsMine: expect.any(Boolean), targetMultipliers: expect.any(Object) }) - expect(masternodeState).toContain(masternodesAfter[masternodeId].state) }) it('should updateMasternode rewardAddress with bech32 address', async () => { @@ -158,14 +147,13 @@ describe('Update Masternode', () => { resignHeight: expect.any(Number), resignTx: expect.any(String), collateralTx: expect.any(String), - state: expect.any(String), + state: 'ENABLED', mintedBlocks: expect.any(Number), ownerIsMine: expect.any(Boolean), localMasternode: expect.any(Boolean), operatorIsMine: expect.any(Boolean), targetMultipliers: expect.any(Object) }) - expect(masternodeState).toContain(masternodesAfter[masternodeId].state) }) it('should update multiple address simultaneously with bech32 address', async () => { @@ -196,14 +184,13 @@ describe('Update Masternode', () => { resignHeight: expect.any(Number), resignTx: expect.any(String), collateralTx: expect.any(String), - state: expect.any(String), + state: 'ENABLED', mintedBlocks: expect.any(Number), ownerIsMine: expect.any(Boolean), localMasternode: expect.any(Boolean), operatorIsMine: expect.any(Boolean), targetMultipliers: expect.any(Object) }) - expect(masternodeState).toContain(masternodes[masternodeId].state) }) it('should update multiple address simultaneously with legacy address', async () => { @@ -234,14 +221,13 @@ describe('Update Masternode', () => { resignHeight: expect.any(Number), resignTx: expect.any(String), collateralTx: expect.any(String), - state: expect.any(String), + state: 'ENABLED', mintedBlocks: expect.any(Number), ownerIsMine: expect.any(Boolean), localMasternode: expect.any(Boolean), operatorIsMine: expect.any(Boolean), targetMultipliers: expect.any(Object) }) - expect(masternodeState).toContain(masternodes[masternodeId].state) }) it('should updateMasternode with utxos', async () => {