diff options
Diffstat (limited to 'pbt')
| -rw-r--r-- | pbt/ts/src/bank.test.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pbt/ts/src/bank.test.ts b/pbt/ts/src/bank.test.ts index d750d05..3b40573 100644 --- a/pbt/ts/src/bank.test.ts +++ b/pbt/ts/src/bank.test.ts @@ -66,7 +66,8 @@ const genOneOperation = (accounts: Map<Account, number>) => const genOperations = (accounts: Map<Account, number>) => listOf(genOneOperation(accounts)); -const correctBalance = +/// Using fake bank as a model to compare with real bank +const levelBankMatchFakeBank = (initialAccounts: Map<Account, number>) => async (ops: Operation[]): Promise<boolean> => { const fakeBank = new SimpleBank(initialAccounts); @@ -158,7 +159,10 @@ describe('Bank Simulator', () => { test('correctly update balance given a sequence of deposits and withdrawals', async () => { const prop = forall(genAccounts, accounts => { - return property(genOperations(accounts), correctBalance(accounts)); + return property( + genOperations(accounts), + levelBankMatchFakeBank(accounts), + ); }); const result = await Property.run(prop); |
