From 83d63d6d3248666ebb23c7c29f0c58775f277482 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Tue, 2 Dec 2025 04:43:49 +0100 Subject: adapt Bank interface to async --- pbt/ts/src/property.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pbt/ts/src/property.test.ts') diff --git a/pbt/ts/src/property.test.ts b/pbt/ts/src/property.test.ts index addff34..67ea81d 100644 --- a/pbt/ts/src/property.test.ts +++ b/pbt/ts/src/property.test.ts @@ -12,7 +12,9 @@ const predicate1: (pair: [number, number]) => Promise = ([x, y]) => describe('Find minimal counterexample', () => { test('do not shrink example if no shrinker given', async () => { - const result = await property(pairOf(positiveInt), predicate1)(42, 1); + const result = await property(pairOf(positiveInt), predicate1).then(p => + p(42, 1), + ); expect(result.result).toBe('Falsified'); expect(result.counterexample).toBeNull; }); @@ -22,7 +24,7 @@ describe('Find minimal counterexample', () => { pairOf(positiveInt), predicate1, shrinkPair(shrinkPositive, shrinkPositive), - )(42, 1); + ).then(p => p(42, 1)); expect(result.result).toBe('Falsified'); if (result.counterexample !== null) { expect(result.counterexample.counterexample).toStrictEqual([10, 10]); -- cgit v1.3.1