From 1a801b947a24d5ad3c9339fc564246a03bb3978c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Mon, 7 Mar 2022 20:01:55 +0100 Subject: [PATCH] ensure for all cosmos mutation that only one op results of a tx --- src/families/cosmos/specs.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/families/cosmos/specs.ts b/src/families/cosmos/specs.ts index 1da1ec8d44..93d2b3a815 100644 --- a/src/families/cosmos/specs.ts +++ b/src/families/cosmos/specs.ts @@ -39,7 +39,12 @@ const cosmos: AppSpec = { transactionCheck: ({ maxSpendable }) => { invariant(maxSpendable.gt(minAmount), "balance is too low"); }, - test: ({ operation, optimisticOperation }) => { + test: ({ account, operation, optimisticOperation }) => { + expect({ + allOperationsMatchingId: account.operations.filter( + (op) => op.id === operation.id + ), + }).toEqual({ allOperationsMatchingId: [operation] }); const opExpected: Record = toOperationRaw({ ...optimisticOperation, });