Skip to content

Commit

Permalink
shorten recursive prop tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Sep 9, 2024
1 parent a6679da commit de447d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/property/candid_rpc/class_api/recursive/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ const AllRecursiveQueryMethodArb = fc.oneof(
)
);

const arrayConstraints =
process.env.AZLE_TEST_RUN_ON_RELEASE === 'true' ||
process.env.AZLE_TEST_RUN_ON_LOCAL === 'true'
? defaultArrayConstraints
: { ...defaultArrayConstraints, maxLength: 50 };

const CanisterConfigArb = fc
.array(AllRecursiveQueryMethodArb, defaultArrayConstraints)
.array(AllRecursiveQueryMethodArb, arrayConstraints)
.map((queryMethods): CanisterConfig => {
return { queryMethods };
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ const AllRecursiveQueryMethodArb = fc.oneof(
)
);

const arrayConstraints =
process.env.AZLE_TEST_RUN_ON_RELEASE === 'true' ||
process.env.AZLE_TEST_RUN_ON_LOCAL === 'true'
? defaultArrayConstraints
: { ...defaultArrayConstraints, maxLength: 50 };

const CanisterConfigArb = fc
.array(AllRecursiveQueryMethodArb, defaultArrayConstraints)
.array(AllRecursiveQueryMethodArb, arrayConstraints)
.map((queryMethods): CanisterConfig => {
return { queryMethods };
});
Expand Down

0 comments on commit de447d4

Please sign in to comment.