summaryrefslogtreecommitdiff
path: root/pbt/ts/src/property.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'pbt/ts/src/property.test.ts')
-rw-r--r--pbt/ts/src/property.test.ts6
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]);