diff options
| author | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-12-02 04:43:49 +0100 |
|---|---|---|
| committer | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-12-02 04:43:49 +0100 |
| commit | 83d63d6d3248666ebb23c7c29f0c58775f277482 (patch) | |
| tree | d6e094a866dcca3bf2320cd0b6754b452358bdc0 /pbt/ts/src/property.test.ts | |
| parent | 8a6cfd0187b149a1ce83f62af62bb227ee441277 (diff) | |
| download | lambda-nantes-83d63d6d3248666ebb23c7c29f0c58775f277482.tar.gz | |
adapt Bank interface to async
Diffstat (limited to 'pbt/ts/src/property.test.ts')
| -rw-r--r-- | pbt/ts/src/property.test.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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<boolean> = ([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]); |
