Repository: dubzzz/fast-check
Pull request #2259 (2021-09-01 22:01:43)

⬆️ Bump @types/lodash from 4.14.171 to 4.14.172 in /example
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.171 to 4.14.172.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/lodash&package-manager=npm_and_yarn&previous-version=4.14.171&new-version=4.14.172)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

codesandbox[bot]: This pull request is automatically built and testable in [CodeSandbox](https://codesandbox.io).

  To see build info of the built libraries, click [here](https://ci.codesandbox.io/status/dubzzz/fast-check/pr/2259/builds/165578) or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 187912164bb099673ea23439406fb568e1b83453:

|Sandbox| Source |
|--|--|
|[Vanilla](https://codesandbox.io/s/vanilla-ovkb5)| Configuration |

codecov[bot]: # [Codecov](https://codecov.io/gh/dubzzz/fast-check/pull/2259?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) Report
> Merging [#2259](https://codecov.io/gh/dubzzz/fast-check/pull/2259?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) (1879121) into [main](https://codecov.io/gh/dubzzz/fast-check/commit/17fbff0ac717f28c7f8ea7d0ac13e5117061a895?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) (17fbff0) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/dubzzz/fast-check/pull/2259/graphs/tree.svg?width=650&height=150&src=pr&token=fRi2fJN730&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN)](https://codecov.io/gh/dubzzz/fast-check/pull/2259?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN)

```diff
@@           Coverage Diff           @@
##             main    #2259   +/-   ##
=======================================
  Coverage   95.52%   95.52%           
=======================================
  Files         200      200           
  Lines        4583     4583           
  Branches      906      906           
=======================================
  Hits         4378     4378           
  Misses        201      201           
  Partials        4        4           
```

| Flag | Coverage Δ | |
|---|---|---|
| unit-tests | `95.52% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN#carryforward-flags-in-the-pull-request-comment) to find out more.


------

[Continue to review full report at Codecov](https://codecov.io/gh/dubzzz/fast-check/pull/2259?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/dubzzz/fast-check/pull/2259?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN). Last update [17fbff0...1879121](https://codecov.io/gh/dubzzz/fast-check/pull/2259?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN).


Patch:
diff --git a/example/package.json b/example/package.json
index 52c50095..745ea65a 100644
--- a/example/package.json
+++ b/example/package.json
@@ -6,7 +6,7 @@
     "test": "jest"
   },
   "dependencies": {
-    "@testing-library/dom": "^8.1.0",
+    "@testing-library/dom": "^8.2.0",
     "@testing-library/jest-dom": "^5.14.1",
     "@testing-library/react": "^12.0.0",
     "@testing-library/user-event": "^13.2.1",
@@ -18,11 +18,11 @@
   },
   "devDependencies": {
     "@types/jest": "^26.0.24",
-    "@types/lodash": "^4.14.171",
+    "@types/lodash": "^4.14.172",
     "@types/react": "^17.0.15",
     "jest": "^26.6.3",
     "ts-jest": "^26.5.6",
-    "typescript": "^4.3.5"
+    "typescript": "^4.4.2"
   },
   "author": "Nicolas DUBIEN <github@dubien.org>",
   "license": "MIT",
diff --git a/example/yarn.lock b/example/yarn.lock
index 6ec4e0d0..0ff6585b 100644
--- a/example/yarn.lock
+++ b/example/yarn.lock
@@ -505,10 +505,10 @@
   dependencies:
     "@sinonjs/commons" "^1.7.0"
 
-"@testing-library/dom@^8.0.0", "@testing-library/dom@^8.1.0":
-  version "8.1.0"
-  resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.1.0.tgz#f8358b1883844ea569ba76b7e94582168df5370d"
-  integrity sha512-kmW9alndr19qd6DABzQ978zKQ+J65gU2Rzkl8hriIetPnwpesRaK4//jEQyYh8fEALmGhomD/LBQqt+o+DL95Q==
+"@testing-library/dom@^8.0.0", "@testing-library/dom@^8.2.0":
+  version "8.2.0"
+  resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.2.0.tgz#ac46a1b9d7c81f0d341ae38fb5424b64c27d151e"
+  integrity sha512-U8cTWENQPHO3QHvxBdfltJ+wC78ytMdg69ASvIdkGdQ/XRg4M9H2vvM3mHddxl+w/fM6NNqzGMwpQoh82v9VIA==
   dependencies:
     "@babel/code-frame" "^7.10.4"
     "@babel/runtime" "^7.12.5"
@@ -621,10 +621,10 @@
     jest-diff "^26.0.0"
     pretty-format "^26.0.0"
 
-"@types/lodash@^4.14.171":
-  version "4.14.171"
-  resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.171.tgz#f01b3a5fe3499e34b622c362a46a609fdb23573b"
-  integrity sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg==
+"@types/lodash@^4.14.172":
+  version "4.14.172"
+  resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.172.tgz#aad774c28e7bfd7a67de25408e03ee5a8c3d028a"
+  integrity sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==
 
 "@types/node@*":
   version "14.14.20"
@@ -3669,10 +3669,10 @@ typedarray-to-buffer@^3.1.5:
   dependencies:
     is-typedarray "^1.0.0"
 
-typescript@^4.3.5:
-  version "4.3.5"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
-  integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
+typescript@^4.4.2:
+  version "4.4.2"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86"
+  integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==
 
 union-value@^1.0.0:
   version "1.0.1"
diff --git a/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts b/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts
index ff3226a4..2eb89cd6 100644
--- a/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts
+++ b/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts
@@ -3,5 +3,5 @@
  * @internal
  */
 export function maxLengthFromMinLength(minLength: number): number {
-  return 2 * minLength + 10;
+  return Math.min(2 * minLength + 10, 0x7fffffff);
 }


Test patch:
diff --git a/test/unit/arbitrary/__snapshots__/array.spec.ts.snap b/test/unit/arbitrary/__snapshots__/array.spec.ts.snap
new file mode 100644
index 00000000..47833080
--- /dev/null
+++ b/test/unit/arbitrary/__snapshots__/array.spec.ts.snap
@@ -0,0 +1,331 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`array (integration) should be able to shrink [2, 4, 8, 16, 32, 64] given constraints minLength:undefined 1`] = `
+"[2,4,8,16,32,64]
+├> []
+├> [16,32,64]
+|  ├> [32,64]
+|  |  ├> [64]
+|  |  |  ├> []
+|  |  |  ├> [62]
+|  |  |  |  ├> []
+|  |  |  |  ├> [59]
+|  |  |  |  |  ├> []
+|  |  |  |  |  ├> [55]
+|  |  |  |  |  |  ├> []
+|  |  |  |  |  |  ├> [50]
+|  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  ├> [44]
+|  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  ├> [37]
+|  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  ├> [29]
+|  |  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  |  ├> [20]
+|  |  |  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  |  |  ├> [10]
+|  |  |  |  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  |  |  |  └> [0]
+|  |  |  |  |  |  |  |  |  |  |  |     └> []
+|  |  |  |  |  |  |  |  |  |  |  └> [11]
+|  |  |  |  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |  |  |  |     ├> [0]
+|  |  |  |  |  |  |  |  |  |  |     |  └> []
+|  |  |  |  |  |  |  |  |  |  |     └> [1]
+|  |  |  |  |  |  |  |  |  |  |        └> []
+|  |  |  |  |  |  |  |  |  |  └> [21]
+|  |  |  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |  |  |     ├> [11]
+|  |  |  |  |  |  |  |  |  |     |  ├> []
+|  |  |  |  |  |  |  |  |  |     |  ├> [0]
+|  |  |  |  |  |  |  |  |  |     |  |  └> []
+|  |  |  |  |  |  |  |  |  |     |  └> [1]
+|  |  |  |  |  |  |  |  |  |     |     └> []
+|  |  |  |  |  |  |  |  |  |     └> [12]
+|  |  |  |  |  |  |  |  |  |        ├> []
+|  |  |  |  |  |  |  |  |  |        ├> [1]
+|  |  |  |  |  |  |  |  |  |        |  └> []
+|  |  |  |  |  |  |  |  |  |        └> [2]
+|  |  |  |  |  |  |  |  |  |           └> []
+|  |  |  |  |  |  |  |  |  └> [30]
+|  |  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |  |     ├> [21]
+|  |  |  |  |  |  |  |  |     |  ├> []
+|  |  |  |  |  |  |  |  |     |  ├> [11]
+|  |  |  |  |  |  |  |  |     |  |  ├> []
+|  |  |  |  |  |  |  |  |     |  |  ├> [0]
+|  |  |  |  |  |  |  |  |     |  |  |  └> []
+|  |  |  |  |  |  |  |  |     |  |  └> [1]
+|  |  |  |  |  |  |  |  |     |  |     └> []
+|  |  |  |  |  |  |  |  |     |  └> [12]
+|  |  |  |  |  |  |  |  |     |     ├> []
+|  |  |  |  |  |  |  |  |     |     ├> [1]
+|  |  |  |  |  |  |  |  |     |     |  └> []
+|  |  |  |  |  |  |  |  |     |     └> [2]
+|  |  |  |  |  |  |  |  |     |        └> []
+|  |  |  |  |  |  |  |  |     └> [22]
+|  |  |  |  |  |  |  |  |        ├> []
+|  |  |  |  |  |  |  |  |        ├> [12]
+|  |  |  |  |  |  |  |  |        |  ├> []
+|  |  |  |  |  |  |  |  |        |  ├> [1]
+|  |  |  |  |  |  |  |  |        |  |  └> []
+|  |  |  |  |  |  |  |  |        |  └> [2]
+|  |  |  |  |  |  |  |  |        |     └> []
+|  |  |  |  |  |  |  |  |        └> [13]
+|  |  |  |  |  |  |  |  |           ├> []
+|  |  |  |  |  |  |  |  |           ├> [2]
+|  |  |  |  |  |  |  |  |           |  └> []
+|  |  |  |  |  |  |  |  |           └> [3]
+|  |  |  |  |  |  |  |  |              └> []
+|  |  |  |  |  |  |  |  └> [38]
+|  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |     ├> [30]
+|  |  |  |  |  |  |  |     |  ├> []
+|  |  |  |  |  |  |  |     |  ├> [21]
+|  |  |  |  |  |  |  |     |  |  ├> []
+|  |  |  |  |  |  |  |     |  |  ├> [11]
+|  |  |  |  |  |  |  |     |  |  |  ├> []
+|  |  |  |  |  |  |  |     |  |  |  ├> [0]
+|  |  |  |  |  |  |  |     |  |  |  |  └> []
+|  |  |  |  |  |  |  |     |  |  |  └> [1]
+|  |  |  |  |  |  |  |     |  |  |     └> []
+|  |  |  |  |  |  |  |     |  |  └> [12]
+|  |  |  |  |  |  |  |     |  |     ├> []
+|  |  |  |  |  |  |  |     |  |     ├> [1]
+|  |  |  |  |  |  |  |     |  |     |  └> []
+|  |  |  |  |  |  |  |     |  |     └> [2]
+|  |  |  |  |  |  |  |     |  |        └> []
+|  |  |  |  |  |  |  |     |  └> [22]
+|  |  |  |  |  |  |  |     |     ├> []
+|  |  |  |  |  |  |  |     |     ├> [12]
+|  |  |  |  |  |  |  |     |     |  ├> []
+|  |  |  |  |  |  |  |     |     |  ├> [1]
+|  |  |  |  |  |  |  |     |     |  |  └> []
+|  |  |  |  |  |  |  |     |     |  └> …
+|  |  |  |  |  |  |  |     |     └> …
+|  |  |  |  |  |  |  |     └> …
+|  |  |  |  |  |  |  └> …
+|  |  |  |  |  |  └> …
+|  |  |  |  |  └> …
+|  |  |  |  └> …
+|  |  |  └> …
+|  |  └> …
+|  └> …
+└> …"
+`;
+
+exports[`array (integration) should be able to shrink [2, 4, 8] given constraints minLength:2 1`] = `
+"[2,4,8]
+├> [4,8]
+|  ├> [2,8]
+|  |  └> [0,8]
+|  └> [3,8]
+|     ├> [0,8]
+|     └> [1,8]
+├> [0,4,8]
+|  ├> [4,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [3,8]
+|  |     ├> [0,8]
+|  |     └> [1,8]
+|  ├> [0,2,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [0,0,8]
+|  |     └> [0,8]
+|  └> [0,3,8]
+|     ├> [3,8]
+|     |  ├> [0,8]
+|     |  └> [1,8]
+|     ├> [0,0,8]
+|     |  └> [0,8]
+|     └> [0,1,8]
+|        └> [1,8]
+├> [1,4,8]
+|  ├> [4,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [3,8]
+|  |     ├> [0,8]
+|  |     └> [1,8]
+|  ├> [1,2,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [1,0,8]
+|  |     └> [0,8]
+|  └> [1,3,8]
+|     ├> [3,8]
+|     |  ├> [0,8]
+|     |  └> [1,8]
+|     ├> [1,0,8]
+|     |  └> [0,8]
+|     └> [1,1,8]
+|        └> [1,8]
+├> [2,2,8]
+|  ├> [2,8]
+|  |  └> [0,8]
+|  ├> [0,2,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [0,0,8]
+|  |     └> [0,8]
+|  ├> [1,2,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [1,0,8]
+|  |     └> [0,8]
+|  └> [2,0,8]
+|     ├> [0,8]
+|     ├> [0,0,8]
+|     |  └> [0,8]
+|     └> [1,0,8]
+|        └> [0,8]
+└> [2,3,8]
+   ├> [3,8]
+   |  ├> [0,8]
+   |  └> [1,8]
+   ├> [0,3,8]
+   |  ├> [3,8]
+   |  |  ├> [0,8]
+   |  |  └> [1,8]
+   |  ├> [0,0,8]
+   |  |  └> [0,8]
+   |  └> [0,1,8]
+   |     └> [1,8]
+   ├> [1,3,8]
+   |  ├> [3,8]
+   |  |  ├> [0,8]
+   |  |  └> [1,8]
+   |  ├> [1,0,8]
+   |  |  └> [0,8]
+   |  └> [1,1,8]
+   |     └> [1,8]
+   ├> [2,0,8]
+   |  ├> [0,8]
+   |  ├> [0,0,8]
+   |  |  └> [0,8]
+   |  └> [1,0,8]
+   |     └> [0,8]
+   └> [2,1,8]
+      ├> [1,8]
+      ├> [0,1,8]
+      |  └> [1,8]
+      └> [1,1,8]
+         └> [1,8]"
+`;
+
+exports[`array (integration) should be able to shrink [2, 4, 8] given constraints minLength:3 1`] = `
+"[2,4,8]
+├> [0,4,8]
+└> [1,4,8]"
+`;
+
+exports[`array (integration) should be able to shrink [2, 4, 8] given constraints minLength:undefined 1`] = `
+"[2,4,8]
+├> []
+├> [4,8]
+|  ├> [8]
+|  |  ├> []
+|  |  ├> [6]
+|  |  |  ├> []
+|  |  |  ├> [3]
+|  |  |  |  ├> []
+|  |  |  |  └> [0]
+|  |  |  |     └> []
+|  |  |  └> [4]
+|  |  |     ├> []
+|  |  |     ├> [0]
+|  |  |     |  └> []
+|  |  |     └> [1]
+|  |  |        └> []
+|  |  └> [7]
+|  |     ├> []
+|  |     ├> [4]
+|  |     |  ├> []
+|  |     |  ├> [0]
+|  |     |  |  └> []
+|  |     |  └> [1]
+|  |     |     └> []
+|  |     └> [5]
+|  |        ├> []
+|  |        ├> [1]
+|  |        |  └> []
+|  |        └> [2]
+|  |           └> []
+|  ├> [2,8]
+|  |  ├> [8]
+|  |  |  ├> []
+|  |  |  ├> [6]
+|  |  |  |  ├> []
+|  |  |  |  ├> [3]
+|  |  |  |  |  ├> []
+|  |  |  |  |  └> [0]
+|  |  |  |  |     └> []
+|  |  |  |  └> [4]
+|  |  |  |     ├> []
+|  |  |  |     ├> [0]
+|  |  |  |     |  └> []
+|  |  |  |     └> [1]
+|  |  |  |        └> []
+|  |  |  └> [7]
+|  |  |     ├> []
+|  |  |     ├> [4]
+|  |  |     |  ├> []
+|  |  |     |  ├> [0]
+|  |  |     |  |  └> []
+|  |  |     |  └> [1]
+|  |  |     |     └> []
+|  |  |     └> [5]
+|  |  |        ├> []
+|  |  |        ├> [1]
+|  |  |        |  └> []
+|  |  |        └> [2]
+|  |  |           └> []
+|  |  ├> [0,8]
+|  |  |  ├> [8]
+|  |  |  |  ├> []
+|  |  |  |  ├> [6]
+|  |  |  |  |  ├> []
+|  |  |  |  |  ├> [3]
+|  |  |  |  |  |  ├> []
+|  |  |  |  |  |  └> [0]
+|  |  |  |  |  |     └> []
+|  |  |  |  |  └> [4]
+|  |  |  |  |     ├> []
+|  |  |  |  |     ├> [0]
+|  |  |  |  |     |  └> []
+|  |  |  |  |     └> [1]
+|  |  |  |  |        └> []
+|  |  |  |  └> [7]
+|  |  |  |     ├> []
+|  |  |  |     ├> [4]
+|  |  |  |     |  ├> []
+|  |  |  |     |  ├> [0]
+|  |  |  |     |  |  └> []
+|  |  |  |     |  └> [1]
+|  |  |  |     |     └> []
+|  |  |  |     └> [5]
+|  |  |  |        ├> []
+|  |  |  |        ├> [1]
+|  |  |  |        |  └> []
+|  |  |  |        └> [2]
+|  |  |  |           └> []
+|  |  |  ├> [0]
+|  |  |  |  └> []
+|  |  |  ├> [0,6]
+|  |  |  |  ├> [6]
+|  |  |  |  |  ├> []
+|  |  |  |  |  ├> [3]
+|  |  |  |  |  |  ├> []
+|  |  |  |  |  |  └> [0]
+|  |  |  |  |  |     └> []
+|  |  |  |  |  └> [4]
+|  |  |  |  |     ├> []
+|  |  |  |  |     └> …
+|  |  |  |  └> …
+|  |  |  └> …
+|  |  └> …
+|  └> …
+└> …"
+`;
diff --git a/test/unit/arbitrary/__snapshots__/set.spec.ts.snap b/test/unit/arbitrary/__snapshots__/set.spec.ts.snap
new file mode 100644
index 00000000..ff1ef237
--- /dev/null
+++ b/test/unit/arbitrary/__snapshots__/set.spec.ts.snap
@@ -0,0 +1,308 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`set (integration) should be able to shrink [2, 4, 8, 16, 32, 64] given constraints minLength:undefined 1`] = `
+"[2,4,8,16,32,64]
+├> []
+├> [16,32,64]
+|  ├> [32,64]
+|  |  ├> [64]
+|  |  |  ├> []
+|  |  |  ├> [62]
+|  |  |  |  ├> []
+|  |  |  |  ├> [59]
+|  |  |  |  |  ├> []
+|  |  |  |  |  ├> [55]
+|  |  |  |  |  |  ├> []
+|  |  |  |  |  |  ├> [50]
+|  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  ├> [44]
+|  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  ├> [37]
+|  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  ├> [29]
+|  |  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  |  ├> [20]
+|  |  |  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  |  |  ├> [10]
+|  |  |  |  |  |  |  |  |  |  |  |  ├> []
+|  |  |  |  |  |  |  |  |  |  |  |  └> [0]
+|  |  |  |  |  |  |  |  |  |  |  |     └> []
+|  |  |  |  |  |  |  |  |  |  |  └> [11]
+|  |  |  |  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |  |  |  |     ├> [0]
+|  |  |  |  |  |  |  |  |  |  |     |  └> []
+|  |  |  |  |  |  |  |  |  |  |     └> [1]
+|  |  |  |  |  |  |  |  |  |  |        └> []
+|  |  |  |  |  |  |  |  |  |  └> [21]
+|  |  |  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |  |  |     ├> [11]
+|  |  |  |  |  |  |  |  |  |     |  ├> []
+|  |  |  |  |  |  |  |  |  |     |  ├> [0]
+|  |  |  |  |  |  |  |  |  |     |  |  └> []
+|  |  |  |  |  |  |  |  |  |     |  └> [1]
+|  |  |  |  |  |  |  |  |  |     |     └> []
+|  |  |  |  |  |  |  |  |  |     └> [12]
+|  |  |  |  |  |  |  |  |  |        ├> []
+|  |  |  |  |  |  |  |  |  |        ├> [1]
+|  |  |  |  |  |  |  |  |  |        |  └> []
+|  |  |  |  |  |  |  |  |  |        └> [2]
+|  |  |  |  |  |  |  |  |  |           └> []
+|  |  |  |  |  |  |  |  |  └> [30]
+|  |  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |  |     ├> [21]
+|  |  |  |  |  |  |  |  |     |  ├> []
+|  |  |  |  |  |  |  |  |     |  ├> [11]
+|  |  |  |  |  |  |  |  |     |  |  ├> []
+|  |  |  |  |  |  |  |  |     |  |  ├> [0]
+|  |  |  |  |  |  |  |  |     |  |  |  └> []
+|  |  |  |  |  |  |  |  |     |  |  └> [1]
+|  |  |  |  |  |  |  |  |     |  |     └> []
+|  |  |  |  |  |  |  |  |     |  └> [12]
+|  |  |  |  |  |  |  |  |     |     ├> []
+|  |  |  |  |  |  |  |  |     |     ├> [1]
+|  |  |  |  |  |  |  |  |     |     |  └> []
+|  |  |  |  |  |  |  |  |     |     └> [2]
+|  |  |  |  |  |  |  |  |     |        └> []
+|  |  |  |  |  |  |  |  |     └> [22]
+|  |  |  |  |  |  |  |  |        ├> []
+|  |  |  |  |  |  |  |  |        ├> [12]
+|  |  |  |  |  |  |  |  |        |  ├> []
+|  |  |  |  |  |  |  |  |        |  ├> [1]
+|  |  |  |  |  |  |  |  |        |  |  └> []
+|  |  |  |  |  |  |  |  |        |  └> [2]
+|  |  |  |  |  |  |  |  |        |     └> []
+|  |  |  |  |  |  |  |  |        └> [13]
+|  |  |  |  |  |  |  |  |           ├> []
+|  |  |  |  |  |  |  |  |           ├> [2]
+|  |  |  |  |  |  |  |  |           |  └> []
+|  |  |  |  |  |  |  |  |           └> [3]
+|  |  |  |  |  |  |  |  |              └> []
+|  |  |  |  |  |  |  |  └> [38]
+|  |  |  |  |  |  |  |     ├> []
+|  |  |  |  |  |  |  |     ├> [30]
+|  |  |  |  |  |  |  |     |  ├> []
+|  |  |  |  |  |  |  |     |  ├> [21]
+|  |  |  |  |  |  |  |     |  |  ├> []
+|  |  |  |  |  |  |  |     |  |  ├> [11]
+|  |  |  |  |  |  |  |     |  |  |  ├> []
+|  |  |  |  |  |  |  |     |  |  |  ├> [0]
+|  |  |  |  |  |  |  |     |  |  |  |  └> []
+|  |  |  |  |  |  |  |     |  |  |  └> [1]
+|  |  |  |  |  |  |  |     |  |  |     └> []
+|  |  |  |  |  |  |  |     |  |  └> [12]
+|  |  |  |  |  |  |  |     |  |     ├> []
+|  |  |  |  |  |  |  |     |  |     ├> [1]
+|  |  |  |  |  |  |  |     |  |     |  └> []
+|  |  |  |  |  |  |  |     |  |     └> [2]
+|  |  |  |  |  |  |  |     |  |        └> []
+|  |  |  |  |  |  |  |     |  └> [22]
+|  |  |  |  |  |  |  |     |     ├> []
+|  |  |  |  |  |  |  |     |     ├> [12]
+|  |  |  |  |  |  |  |     |     |  ├> []
+|  |  |  |  |  |  |  |     |     |  ├> [1]
+|  |  |  |  |  |  |  |     |     |  |  └> []
+|  |  |  |  |  |  |  |     |     |  └> …
+|  |  |  |  |  |  |  |     |     └> …
+|  |  |  |  |  |  |  |     └> …
+|  |  |  |  |  |  |  └> …
+|  |  |  |  |  |  └> …
+|  |  |  |  |  └> …
+|  |  |  |  └> …
+|  |  |  └> …
+|  |  └> …
+|  └> …
+└> …"
+`;
+
+exports[`set (integration) should be able to shrink [2, 4, 8] given constraints minLength:2 1`] = `
+"[2,4,8]
+├> [4,8]
+|  ├> [2,8]
+|  |  └> [0,8]
+|  └> [3,8]
+|     ├> [0,8]
+|     └> [1,8]
+├> [0,4,8]
+|  ├> [4,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [3,8]
+|  |     ├> [0,8]
+|  |     └> [1,8]
+|  ├> [0,2,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [0,8]
+|  └> [0,3,8]
+|     ├> [3,8]
+|     |  ├> [0,8]
+|     |  └> [1,8]
+|     ├> [0,8]
+|     └> [0,1,8]
+|        └> [1,8]
+├> [1,4,8]
+|  ├> [4,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [3,8]
+|  |     ├> [0,8]
+|  |     └> [1,8]
+|  ├> [1,2,8]
+|  |  ├> [2,8]
+|  |  |  └> [0,8]
+|  |  └> [1,0,8]
+|  |     └> [0,8]
+|  └> [1,3,8]
+|     ├> [3,8]
+|     |  ├> [0,8]
+|     |  └> [1,8]
+|     ├> [1,0,8]
+|     |  └> [0,8]
+|     └> [1,8]
+├> [2,8]
+|  ├> [0,8]
+|  └> [1,8]
+└> [2,3,8]
+   ├> [3,8]
+   |  ├> [0,8]
+   |  └> [1,8]
+   ├> [0,3,8]
+   |  ├> [3,8]
+   |  |  ├> [0,8]
+   |  |  └> [1,8]
+   |  ├> [0,8]
+   |  └> [0,1,8]
+   |     └> [1,8]
+   ├> [1,3,8]
+   |  ├> [3,8]
+   |  |  ├> [0,8]
+   |  |  └> [1,8]
+   |  ├> [1,0,8]
+   |  |  └> [0,8]
+   |  └> [1,8]
+   ├> [2,0,8]
+   |  ├> [0,8]
+   |  ├> [0,8]
+   |  └> [1,0,8]
+   |     └> [0,8]
+   └> [2,1,8]
+      ├> [1,8]
+      ├> [0,1,8]
+      |  └> [1,8]
+      └> [1,8]"
+`;
+
+exports[`set (integration) should be able to shrink [2, 4, 8] given constraints minLength:3 1`] = `
+"[2,4,8]
+├> [0,4,8]
+└> [1,4,8]"
+`;
+
+exports[`set (integration) should be able to shrink [2, 4, 8] given constraints minLength:undefined 1`] = `
+"[2,4,8]
+├> []
+├> [4,8]
+|  ├> [8]
+|  |  ├> []
+|  |  ├> [6]
+|  |  |  ├> []
+|  |  |  ├> [3]
+|  |  |  |  ├> []
+|  |  |  |  └> [0]
+|  |  |  |     └> []
+|  |  |  └> [4]
+|  |  |     ├> []
+|  |  |     ├> [0]
+|  |  |     |  └> []
+|  |  |     └> [1]
+|  |  |        └> []
+|  |  └> [7]
+|  |     ├> []
+|  |     ├> [4]
+|  |     |  ├> []
+|  |     |  ├> [0]
+|  |     |  |  └> []
+|  |     |  └> [1]
+|  |     |     └> []
+|  |     └> [5]
+|  |        ├> []
+|  |        ├> [1]
+|  |        |  └> []
+|  |        └> [2]
+|  |           └> []
+|  ├> [2,8]
+|  |  ├> [8]
+|  |  |  ├> []
+|  |  |  ├> [6]
+|  |  |  |  ├> []
+|  |  |  |  ├> [3]
+|  |  |  |  |  ├> []
+|  |  |  |  |  └> [0]
+|  |  |  |  |     └> []
+|  |  |  |  └> [4]
+|  |  |  |     ├> []
+|  |  |  |     ├> [0]
+|  |  |  |     |  └> []
+|  |  |  |     └> [1]
+|  |  |  |        └> []
+|  |  |  └> [7]
+|  |  |     ├> []
+|  |  |     ├> [4]
+|  |  |     |  ├> []
+|  |  |     |  ├> [0]
+|  |  |     |  |  └> []
+|  |  |     |  └> [1]
+|  |  |     |     └> []
+|  |  |     └> [5]
+|  |  |        ├> []
+|  |  |        ├> [1]
+|  |  |        |  └> []
+|  |  |        └> [2]
+|  |  |           └> []
+|  |  ├> [0,8]
+|  |  |  ├> [8]
+|  |  |  |  ├> []
+|  |  |  |  ├> [6]
+|  |  |  |  |  ├> []
+|  |  |  |  |  ├> [3]
+|  |  |  |  |  |  ├> []
+|  |  |  |  |  |  └> [0]
+|  |  |  |  |  |     └> []
+|  |  |  |  |  └> [4]
+|  |  |  |  |     ├> []
+|  |  |  |  |     ├> [0]
+|  |  |  |  |     |  └> []
+|  |  |  |  |     └> [1]
+|  |  |  |  |        └> []
+|  |  |  |  └> [7]
+|  |  |  |     ├> []
+|  |  |  |     ├> [4]
+|  |  |  |     |  ├> []
+|  |  |  |     |  ├> [0]
+|  |  |  |     |  |  └> []
+|  |  |  |     |  └> [1]
+|  |  |  |     |     └> []
+|  |  |  |     └> [5]
+|  |  |  |        ├> []
+|  |  |  |        ├> [1]
+|  |  |  |        |  └> []
+|  |  |  |        └> [2]
+|  |  |  |           └> []
+|  |  |  ├> [0]
+|  |  |  |  └> []
+|  |  |  ├> [0,6]
+|  |  |  |  ├> [6]
+|  |  |  |  |  ├> []
+|  |  |  |  |  ├> [3]
+|  |  |  |  |  |  ├> []
+|  |  |  |  |  |  └> [0]
+|  |  |  |  |  |     └> []
+|  |  |  |  |  └> [4]
+|  |  |  |  |     ├> []
+|  |  |  |  |     └> …
+|  |  |  |  └> …
+|  |  |  └> …
+|  |  └> …
+|  └> …
+└> …"
+`;
diff --git a/test/unit/arbitrary/array.spec.ts b/test/unit/arbitrary/array.spec.ts
new file mode 100644
index 00000000..dd7c5fad
--- /dev/null
+++ b/test/unit/arbitrary/array.spec.ts
@@ -0,0 +1,230 @@
+import * as fc from '../../../lib/fast-check';
+import { array } from '../../../src/arbitrary/array';
+
+import { convertFromNext, convertToNext } from '../../../src/check/arbitrary/definition/Converters';
+import { FakeIntegerArbitrary, fakeNextArbitrary } from '../check/arbitrary/generic/NextArbitraryHelpers';
+
+import * as ArrayArbitraryMock from '../../../src/arbitrary/_internals/ArrayArbitrary';
+import {
+  assertProduceCorrectValues,
+  assertProduceSameValueGivenSameSeed,
+  assertProduceValuesShrinkableWithoutContext,
+  assertShrinkProducesSameValueWithoutInitialContext,
+  assertShrinkProducesStrictlySmallerValue,
+} from '../check/arbitrary/generic/NextArbitraryAssertions';
+import { isStrictlySmallerArray } from '../check/arbitrary/generic/ArrayHelpers';
+import { NextValue } from '../../../src/check/arbitrary/definition/NextValue';
+import { buildNextShrinkTree, renderTree } from '../check/arbitrary/generic/ShrinkTree';
+
+function beforeEachHook() {
+  jest.resetModules();
+  jest.restoreAllMocks();
+  fc.configureGlobal({ beforeEach: beforeEachHook });
+}
+beforeEach(beforeEachHook);
+
+describe('array', () => {
+  it('should instantiate ArrayArbitrary(arb, 0, ?) for array(arb)', () => {
+    // Arrange
+    const { instance: childInstance } = fakeNextArbitrary<unknown>();
+    const { instance } = fakeNextArbitrary<unknown[]>();
+    const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+    ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+    // Act
+    const arb = array(convertFromNext(childInstance));
+
+    // Assert
+    expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, expect.any(Number));
+    const receivedMaxLength = ArrayArbitrary.mock.calls[0][2]; // Expecting the real value would check an implementation detail
+    expect(receivedMaxLength).toBeGreaterThan(0);
+    expect(receivedMaxLength).toBeLessThanOrEqual(2 ** 31 - 1);
+    expect(Number.isInteger(receivedMaxLength)).toBe(true);
+    expect(convertToNext(arb)).toBe(instance);
+  });
+
+  it('should instantiate ArrayArbitrary(arb, 0, maxLength) for array(arb, {maxLength})', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), (maxLength) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = array(convertFromNext(childInstance), { maxLength });
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, maxLength);
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('should instantiate ArrayArbitrary(arb, minLength, ?) for array(arb, {minLength})', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), (minLength) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = array(convertFromNext(childInstance), { minLength });
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, expect.any(Number));
+        const receivedMaxLength = ArrayArbitrary.mock.calls[0][2]; // Expecting the real value would check an implementation detail
+        if (minLength !== 2 ** 31 - 1) {
+          expect(receivedMaxLength).toBeGreaterThan(minLength);
+          expect(receivedMaxLength).toBeLessThanOrEqual(2 ** 31 - 1);
+          expect(Number.isInteger(receivedMaxLength)).toBe(true);
+        } else {
+          expect(receivedMaxLength).toEqual(minLength);
+        }
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('should instantiate ArrayArbitrary(arb, minLength, maxLength) for array(arb, {minLength,maxLength})', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), fc.nat({ max: 2 ** 31 - 1 }), (aLength, bLength) => {
+        // Arrange
+        const [minLength, maxLength] = aLength < bLength ? [aLength, bLength] : [bLength, aLength];
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = array(convertFromNext(childInstance), { minLength, maxLength });
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, maxLength);
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, 0, maxLength) for array(arb, maxLength)', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), (maxLength) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = array(convertFromNext(childInstance), maxLength);
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, maxLength);
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, minLength, maxLength) for array(arb, minLength, maxLength)', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), fc.nat({ max: 2 ** 31 - 1 }), (aLength, bLength) => {
+        // Arrange
+        const [minLength, maxLength] = aLength < bLength ? [aLength, bLength] : [bLength, aLength];
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = array(convertFromNext(childInstance), minLength, maxLength);
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, maxLength);
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('should throw when minimum length is greater than maximum one', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), fc.nat({ max: 2 ** 31 - 1 }), (aLength, bLength) => {
+        // Arrange
+        fc.pre(aLength !== bLength);
+        const [minLength, maxLength] = aLength < bLength ? [bLength, aLength] : [aLength, bLength];
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+
+        // Act / Assert
+        expect(() => array(convertFromNext(childInstance), { minLength, maxLength })).toThrowError();
+      })
+    );
+  });
+});
+
+describe('array (integration)', () => {
+  type Extra = { minLength?: number; maxLength?: number };
+  const extraParameters: fc.Arbitrary<Extra> = fc
+    .tuple(fc.nat({ max: 30 }), fc.nat({ max: 30 }), fc.boolean(), fc.boolean())
+    .map(([min, gap, withMin, withMax]) => ({
+      minLength: withMin ? min : undefined,
+      maxLength: withMax ? min + gap : undefined,
+    }));
+
+  const isCorrect = (value: number[], extra: Extra) => {
+    if (extra.minLength !== undefined) {
+      expect(value.length).toBeGreaterThanOrEqual(extra.minLength);
+    }
+    if (extra.maxLength !== undefined) {
+      expect(value.length).toBeLessThanOrEqual(extra.maxLength);
+    }
+    for (const v of value) {
+      expect(typeof v).toBe('number');
+    }
+  };
+
+  const isStrictlySmaller = isStrictlySmallerArray;
+
+  const arrayBuilder = (extra: Extra) => convertToNext(array(convertFromNext(new FakeIntegerArbitrary()), extra));
+
+  it('should produce the same values given the same seed', () => {
+    assertProduceSameValueGivenSameSeed(arrayBuilder, { extraParameters });
+  });
+
+  it('should only produce correct values', () => {
+    assertProduceCorrectValues(arrayBuilder, isCorrect, { extraParameters });
+  });
+
+  it('should produce values seen as shrinkable without any context', () => {
+    assertProduceValuesShrinkableWithoutContext(arrayBuilder, { extraParameters });
+  });
+
+  it('should be able to shrink to the same values without initial context', () => {
+    assertShrinkProducesSameValueWithoutInitialContext(arrayBuilder, { extraParameters });
+  });
+
+  it('should preserve strictly smaller ordering in shrink', () => {
+    assertShrinkProducesStrictlySmallerValue(arrayBuilder, isStrictlySmaller, { extraParameters });
+  });
+
+  it.each`
+    rawValue                 | minLength
+    ${[2, 4, 8, 16, 32, 64]} | ${undefined}
+    ${[2, 4, 8]}             | ${undefined}
+    ${[2, 4, 8]}             | ${2}
+    ${[2, 4, 8]}             | ${3}
+  `('should be able to shrink $rawValue given constraints minLength:$minLength', ({ rawValue, minLength }) => {
+    // Arrange
+    const constraints = { minLength };
+    const arb = convertToNext(array(convertFromNext(new FakeIntegerArbitrary(0, 1000)), constraints));
+    const value = new NextValue(rawValue, undefined);
+
+    // Act
+    const renderedTree = renderTree(buildNextShrinkTree(arb, value, { numItems: 100 })).join('\n');
+
+    // Assert
+    expect(arb.canShrinkWithoutContext(rawValue)).toBe(true);
+    expect(renderedTree).toMatchSnapshot();
+  });
+});
diff --git a/test/unit/arbitrary/set.spec.ts b/test/unit/arbitrary/set.spec.ts
new file mode 100644
index 00000000..475c7c08
--- /dev/null
+++ b/test/unit/arbitrary/set.spec.ts
@@ -0,0 +1,358 @@
+import * as fc from '../../../lib/fast-check';
+import { set } from '../../../src/arbitrary/set';
+
+import { convertFromNext, convertToNext } from '../../../src/check/arbitrary/definition/Converters';
+import { FakeIntegerArbitrary, fakeNextArbitrary } from '../check/arbitrary/generic/NextArbitraryHelpers';
+
+import * as ArrayArbitraryMock from '../../../src/arbitrary/_internals/ArrayArbitrary';
+import {
+  assertProduceCorrectValues,
+  assertProduceSameValueGivenSameSeed,
+  assertProduceValuesShrinkableWithoutContext,
+  assertShrinkProducesSameValueWithoutInitialContext,
+  assertShrinkProducesStrictlySmallerValue,
+} from '../check/arbitrary/generic/NextArbitraryAssertions';
+import { isStrictlySmallerArray } from '../check/arbitrary/generic/ArrayHelpers';
+import { NextValue } from '../../../src/check/arbitrary/definition/NextValue';
+import { buildNextShrinkTree, renderTree } from '../check/arbitrary/generic/ShrinkTree';
+
+function beforeEachHook() {
+  jest.resetModules();
+  jest.restoreAllMocks();
+  fc.configureGlobal({ beforeEach: beforeEachHook });
+}
+beforeEach(beforeEachHook);
+
+describe('set', () => {
+  it('should instantiate ArrayArbitrary(arb, 0, ?, <default>) for set(arb)', () => {
+    // Arrange
+    const { instance: childInstance } = fakeNextArbitrary<unknown>();
+    const { instance } = fakeNextArbitrary<unknown[]>();
+    const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+    ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+    // Act
+    const arb = set(convertFromNext(childInstance));
+
+    // Assert
+    expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, expect.any(Number), expect.any(Function));
+    const receivedMaxLength = ArrayArbitrary.mock.calls[0][2]; // Expecting the real value would check an implementation detail
+    expect(receivedMaxLength).toBeGreaterThan(0);
+    expect(receivedMaxLength).toBeLessThanOrEqual(2 ** 31 - 1);
+    expect(Number.isInteger(receivedMaxLength)).toBe(true);
+    expect(convertToNext(arb)).toBe(instance);
+  });
+
+  it('should instantiate ArrayArbitrary(arb, 0, maxLength, <default>) for array(set, {maxLength})', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), (maxLength) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), { maxLength });
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, maxLength, expect.any(Function));
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('should instantiate ArrayArbitrary(arb, minLength, ?, <default>) for set(arb, {minLength})', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), (minLength) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance, filter } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+        filter.mockReturnValue(instance);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), { minLength });
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, expect.any(Number), expect.any(Function));
+        const receivedMaxLength = ArrayArbitrary.mock.calls[0][2]; // Expecting the real value would check an implementation detail
+        if (minLength !== 2 ** 31 - 1) {
+          expect(receivedMaxLength).toBeGreaterThan(minLength);
+          expect(receivedMaxLength).toBeLessThanOrEqual(2 ** 31 - 1);
+          expect(Number.isInteger(receivedMaxLength)).toBe(true);
+        } else {
+          expect(receivedMaxLength).toEqual(minLength);
+        }
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('should instantiate ArrayArbitrary(arb, minLength, maxLength, <default>) for set(arb, {minLength,maxLength})', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), fc.nat({ max: 2 ** 31 - 1 }), (aLength, bLength) => {
+        // Arrange
+        const [minLength, maxLength] = aLength < bLength ? [aLength, bLength] : [bLength, aLength];
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance, filter } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+        filter.mockReturnValue(instance);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), { minLength, maxLength });
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, maxLength, expect.any(Function));
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('should pass the compare operator down to the instantiated ArrayArbitrary', () => {
+    fc.assert(
+      fc.property(
+        fc
+          .record(
+            {
+              minLength: fc.nat({ max: 2 ** 31 - 1 }),
+              maxLength: fc.nat({ max: 2 ** 31 - 1 }),
+              compare: equalityCompare(),
+            },
+            { requiredKeys: ['compare'] }
+          )
+          .map((constraints) =>
+            constraints.minLength !== undefined &&
+            constraints.maxLength !== undefined &&
+            constraints.minLength > constraints.maxLength
+              ? { ...constraints, minLength: constraints.maxLength, maxLength: constraints.minLength }
+              : { ...constraints }
+          ),
+        (constraints) => {
+          // Arrange
+          const { instance: childInstance } = fakeNextArbitrary<unknown>();
+          const { instance, filter } = fakeNextArbitrary<unknown[]>();
+          const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+          ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+          filter.mockReturnValue(instance);
+
+          // Act
+          const arb = set(convertFromNext(childInstance), { ...constraints });
+
+          // Assert
+          expect(ArrayArbitrary).toHaveBeenCalledWith(
+            childInstance,
+            constraints.minLength !== undefined ? constraints.minLength : expect.any(Number),
+            constraints.maxLength !== undefined ? constraints.maxLength : expect.any(Number),
+            constraints.compare
+          );
+          expect(convertToNext(arb)).toBe(instance);
+        }
+      )
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, 0, maxLength, compare) for set(arb, compare)', () => {
+    fc.assert(
+      fc.property(equalityCompare(), (compare) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), compare);
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, expect.any(Number), compare);
+        const receivedMaxLength = ArrayArbitrary.mock.calls[0][2]; // Expecting the real value would check an implementation detail
+        expect(receivedMaxLength).toBeGreaterThan(0);
+        expect(receivedMaxLength).toBeLessThanOrEqual(2 ** 31 - 1);
+        expect(Number.isInteger(receivedMaxLength)).toBe(true);
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, 0, maxLength, <default>) for set(arb, maxLength)', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), (maxLength) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), maxLength);
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, maxLength, expect.any(Function));
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, 0, maxLength, compare) for set(arb, maxLength, compare)', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), equalityCompare(), (maxLength, compare) => {
+        // Arrange
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), maxLength, compare);
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, 0, maxLength, compare);
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, minLength, maxLength, <default>) for set(arb, minLength, maxLength)', () => {
+    fc.assert(
+      fc.property(fc.nat({ max: 2 ** 31 - 1 }), fc.nat({ max: 2 ** 31 - 1 }), (aLength, bLength) => {
+        // Arrange
+        const [minLength, maxLength] = aLength < bLength ? [aLength, bLength] : [bLength, aLength];
+        const { instance: childInstance } = fakeNextArbitrary<unknown>();
+        const { instance, filter } = fakeNextArbitrary<unknown[]>();
+        const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+        ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+        filter.mockReturnValue(instance);
+
+        // Act
+        const arb = set(convertFromNext(childInstance), minLength, maxLength);
+
+        // Assert
+        expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, maxLength, expect.any(Function));
+        expect(convertToNext(arb)).toBe(instance);
+      })
+    );
+  });
+
+  it('[legacy] should instantiate ArrayArbitrary(arb, minLength, maxLength, compare) for set(arb, minLength, maxLength, compare)', () => {
+    fc.assert(
+      fc.property(
+        fc.nat({ max: 2 ** 31 - 1 }),
+        fc.nat({ max: 2 ** 31 - 1 }),
+        equalityCompare(),
+        (aLength, bLength, compare) => {
+          // Arrange
+          const [minLength, maxLength] = aLength < bLength ? [aLength, bLength] : [bLength, aLength];
+          const { instance: childInstance } = fakeNextArbitrary<unknown>();
+          const { instance, filter } = fakeNextArbitrary<unknown[]>();
+          const ArrayArbitrary = jest.spyOn(ArrayArbitraryMock, 'ArrayArbitrary');
+          ArrayArbitrary.mockImplementation(() => instance as ArrayArbitraryMock.ArrayArbitrary<unknown>);
+          filter.mockReturnValue(instance);
+
+          // Act
+          const arb = set(convertFromNext(childInstance), minLength, maxLength, compare);
+
+          // Assert
+          expect(ArrayArbitrary).toHaveBeenCalledWith(childInstance, minLength, maxLength, compare);
+          expect(convertToNext(arb)).toBe(instance);
+        }
+      )
+    );
+  });
+
+  it('should throw when minimum length is greater than maximum one', () => {
+    fc.assert(
+      fc.property(
+        fc.nat({ max: 2 ** 31 - 1 }),
+        fc.nat({ max: 2 ** 31 - 1 }),
+        fc.option(equalityCompare(), { nil: undefined }),
+        (aLength, bLength, compare) => {
+          // Arrange
+          fc.pre(aLength !== bLength);
+          const [minLength, maxLength] = aLength < bLength ? [bLength, aLength] : [aLength, bLength];
+          const { instance: childInstance } = fakeNextArbitrary<unknown>();
+
+          // Act / Assert
+          expect(() => set(convertFromNext(childInstance), { minLength, maxLength, compare })).toThrowError();
+        }
+      )
+    );
+  });
+});
+
+describe('set (integration)', () => {
+  type Extra = { minLength?: number; maxLength?: number };
+  const extraParameters: fc.Arbitrary<Extra> = fc
+    .tuple(fc.nat({ max: 30 }), fc.nat({ max: 30 }), fc.boolean(), fc.boolean())
+    .map(([min, gap, withMin, withMax]) => ({
+      minLength: withMin ? min : undefined,
+      maxLength: withMax ? min + gap : undefined,
+    }));
+
+  const isCorrect = (value: number[], extra: Extra) => {
+    if (extra.minLength !== undefined) {
+      expect(value.length).toBeGreaterThanOrEqual(extra.minLength);
+    }
+    if (extra.maxLength !== undefined) {
+      expect(value.length).toBeLessThanOrEqual(extra.maxLength);
+    }
+    for (const v of value) {
+      expect(typeof v).toBe('number');
+    }
+    expect([...new Set(value)]).toEqual(value);
+  };
+
+  const isStrictlySmaller = isStrictlySmallerArray;
+
+  const setBuilder = (extra: Extra) => convertToNext(set(convertFromNext(new FakeIntegerArbitrary()), extra));
+
+  it('should produce the same values given the same seed', () => {
+    assertProduceSameValueGivenSameSeed(setBuilder, { extraParameters });
+  });
+
+  it('should only produce correct values', () => {
+    assertProduceCorrectValues(setBuilder, isCorrect, { extraParameters });
+  });
+
+  it('should produce values seen as shrinkable without any context', () => {
+    assertProduceValuesShrinkableWithoutContext(setBuilder, { extraParameters });
+  });
+
+  it('should be able to shrink to the same values without initial context', () => {
+    assertShrinkProducesSameValueWithoutInitialContext(setBuilder, { extraParameters });
+  });
+
+  it('should preserve strictly smaller ordering in shrink', () => {
+    assertShrinkProducesStrictlySmallerValue(setBuilder, isStrictlySmaller, { extraParameters });
+  });
+
+  it.each`
+    rawValue                 | minLength
+    ${[2, 4, 8, 16, 32, 64]} | ${undefined}
+    ${[2, 4, 8]}             | ${undefined}
+    ${[2, 4, 8]}             | ${2}
+    ${[2, 4, 8]}             | ${3}
+  `('should be able to shrink $rawValue given constraints minLength:$minLength', ({ rawValue, minLength }) => {
+    // Arrange
+    const constraints = { minLength };
+    const arb = convertToNext(set(convertFromNext(new FakeIntegerArbitrary(0, 1000)), constraints));
+    const value = new NextValue(rawValue, undefined);
+
+    // Act
+    const renderedTree = renderTree(buildNextShrinkTree(arb, value, { numItems: 100 })).join('\n');
+
+    // Assert
+    expect(arb.canShrinkWithoutContext(rawValue)).toBe(true);
+    expect(renderedTree).toMatchSnapshot();
+  });
+});
+
+// Helpers
+
+function equalityCompare() {
+  return fc.compareFunc().map((f) => {
+    return (a: unknown, b: unknown) => f(a, b) === 0;
+  });
+}
diff --git a/test/unit/check/arbitrary/ArrayArbitrary.spec.ts b/test/unit/check/arbitrary/ArrayArbitrary.spec.ts
index 171ff437..574e0346 100644
--- a/test/unit/check/arbitrary/ArrayArbitrary.spec.ts
+++ b/test/unit/check/arbitrary/ArrayArbitrary.spec.ts
@@ -7,10 +7,6 @@ import { context } from '../../../../src/arbitrary/context';
 import { nat } from '../../../../src/arbitrary/nat';
 import { Random } from '../../../../src/random/generator/Random';
 
-import { isStrictlySmallerArray } from './generic/ArrayHelpers';
-import { generateOneValue } from './generic/GenerateOneValue';
-import * as genericHelper from './generic/GenericArbitraryHelper';
-
 import * as stubRng from '../../stubs/generators';
 import { hasCloneMethod, cloneMethod } from '../../../../src/check/symbols';
 
@@ -71,62 +67,5 @@ describe('ArrayArbitrary', () => {
       array(withClonedAndCounter).generate(mrng);
       expect(numCallsToClone).toEqual(0);
     });
-    describe('Given no length constraints', () => {
-      genericHelper.isValidArbitrary(() => array(nat()), {
-        isStrictlySmallerValue: isStrictlySmallerArray,
-        isValidValue: (g: number[]) => Array.isArray(g) && g.every((v) => typeof v === 'number'),
-      });
-    });
-    describe('Given minimal length only', () => {
-      genericHelper.isValidArbitrary((minLength: number) => array(nat(), { minLength }), {
-        seedGenerator: fc.nat(100),
-        isStrictlySmallerValue: isStrictlySmallerArray,
-        isValidValue: (g: number[], minLength: number) =>
-          Array.isArray(g) && g.length >= minLength && g.every((v) => typeof v === 'number'),
-      });
-    });
-    describe('Given maximal length only', () => {
-      genericHelper.isValidArbitrary((maxLength: number) => array(nat(), { maxLength }), {
-        seedGenerator: fc.nat(100),
-        isStrictlySmallerValue: isStrictlySmallerArray,
-        isValidValue: (g: number[], maxLength: number) =>
-          Array.isArray(g) && g.length <= maxLength && g.every((v) => typeof v === 'number'),
-      });
-    });
-    describe('Given minimal and maximal lengths', () => {
-      genericHelper.isValidArbitrary(
-        (constraints: { min: number; max: number }) =>
-          array(nat(), { minLength: constraints.min, maxLength: constraints.max }),
-        {
-          seedGenerator: genericHelper.minMax(fc.nat(100)),
-          isStrictlySmallerValue: isStrictlySmallerArray,
-          isValidValue: (g: number[], constraints: { min: number; max: number }) =>
-            Array.isArray(g) &&
-            g.length >= constraints.min &&
-            g.length <= constraints.max &&
-            g.every((v) => typeof v === 'number'),
-        }
-      );
-    });
-    describe('Still support non recommended signatures', () => {
-      it('Should support fc.array(arb, maxLength)', () => {
-        fc.assert(
-          fc.property(fc.integer(), fc.nat(100), (seed, maxLength) => {
-            const refArbitrary = array(nat(), { maxLength });
-            const nonRecommendedArbitrary = array(nat(), maxLength);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-      it('Should support fc.array(arb, minLength, maxLength)', () => {
-        fc.assert(
-          fc.property(fc.integer(), genericHelper.minMax(fc.nat(100)), (seed, minMaxLength) => {
-            const refArbitrary = array(nat(), { minLength: minMaxLength.min, maxLength: minMaxLength.max });
-            const nonRecommendedArbitrary = array(nat(), minMaxLength.min, minMaxLength.max);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-    });
   });
 });
diff --git a/test/unit/check/arbitrary/SetArbitrary.spec.ts b/test/unit/check/arbitrary/SetArbitrary.spec.ts
deleted file mode 100644
index 75f9da6a..00000000
--- a/test/unit/check/arbitrary/SetArbitrary.spec.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import * as fc from '../../../../lib/fast-check';
-
-import { set } from '../../../../src/arbitrary/set';
-import { nat } from '../../../../src/arbitrary/nat';
-import { string } from '../../../../src/arbitrary/string';
-
-import { generateOneValue } from './generic/GenerateOneValue';
-import * as genericHelper from './generic/GenericArbitraryHelper';
-
-const customMapper = (v: number) => {
-  return { key: v };
-};
-const customCompare = (a: { key: number }, b: { key: number }) => a.key === b.key;
-
-const validSet = (s: number[]) => s.length === new Set(s).size && s.every((e) => typeof e === 'number');
-const validCustomSet = (s: { key: number }[]) => validSet(s.map((v) => v.key));
-
-const isStrictlySmallerSet = (arr1: number[], arr2: number[]) => {
-  if (arr1.length > arr2.length) return false;
-  if (arr1.length === arr2.length) {
-    return arr1.every((v, idx) => arr1[idx] <= arr2[idx]) && arr1.find((v, idx) => arr1[idx] < arr2[idx]) != null;
-  }
-  for (let idx1 = 0, idx2 = 0; idx1 < arr1.length && idx2 < arr2.length; ++idx1, ++idx2) {
-    while (idx2 < arr2.length && arr1[idx1] > arr2[idx2]) ++idx2;
-    if (idx2 === arr2.length) return false;
-  }
-  return true;
-};
-const isStrictlySmallerCustomSet = (arr1: { key: number }[], arr2: { key: number }[]) =>
-  isStrictlySmallerSet(
-    arr1.map((v) => v.key),
-    arr2.map((v) => v.key)
-  );
-
-describe('SetArbitrary', () => {
-  describe('set', () => {
-    describe('Given no length constraints [unique items only]', () => {
-      genericHelper.isValidArbitrary(() => set(nat()), {
-        isStrictlySmallerValue: isStrictlySmallerSet,
-        isValidValue: (g: number[]) => validSet(g),
-      });
-    });
-    describe('Given no length constraints but comparator [unique items for the specified comparator]', () => {
-      genericHelper.isValidArbitrary(() => set(nat().map(customMapper), { compare: customCompare }), {
-        isStrictlySmallerValue: isStrictlySmallerCustomSet,
-        isValidValue: (g: { key: number }[]) => validCustomSet(g),
-      });
-    });
-    describe('Given minimal length only', () => {
-      genericHelper.isValidArbitrary((minLength: number) => set(nat(), { minLength }), {
-        seedGenerator: fc.nat(100),
-        isStrictlySmallerValue: isStrictlySmallerSet,
-        isValidValue: (g: number[], minLength: number) => validSet(g) && g.length >= minLength,
-      });
-    });
-    describe('Given maximal length only', () => {
-      genericHelper.isValidArbitrary((maxLength: number) => set(nat(), { maxLength }), {
-        seedGenerator: fc.nat(100),
-        isStrictlySmallerValue: isStrictlySmallerSet,
-        isValidValue: (g: number[], maxLength: number) => validSet(g) && g.length <= maxLength,
-      });
-    });
-    describe('Given minimal and maximal lengths', () => {
-      genericHelper.isValidArbitrary(
-        (constraints: { min: number; max: number }) =>
-          set(nat(), { minLength: constraints.min, maxLength: constraints.max }),
-        {
-          seedGenerator: genericHelper.minMax(fc.nat(100)),
-          isStrictlySmallerValue: isStrictlySmallerSet,
-          isValidValue: (g: number[], constraints: { min: number; max: number }) =>
-            validSet(g) && g.length >= constraints.min && g.length <= constraints.max,
-        }
-      );
-    });
-    describe('Still support non recommended signatures', () => {
-      const compare = (a: string, b: string) => {
-        return a.split('').sort().join('') === b.split('').sort().join('');
-      };
-      it('Should support fc.set(arb, maxLength)', () => {
-        fc.assert(
-          fc.property(fc.integer(), fc.nat(100), (seed, maxLength) => {
-            const refArbitrary = set(nat(), { maxLength });
-            const nonRecommendedArbitrary = set(nat(), maxLength);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-      it('Should support fc.set(arb, compare)', () => {
-        fc.assert(
-          fc.property(fc.integer(), (seed) => {
-            const refArbitrary = set(string(), { compare });
-            const nonRecommendedArbitrary = set(string(), compare);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-      it('Should support fc.set(arb, maxLength, compare)', () => {
-        fc.assert(
-          fc.property(fc.integer(), fc.nat(100), (seed, maxLength) => {
-            const refArbitrary = set(string(), { maxLength, compare });
-            const nonRecommendedArbitrary = set(string(), maxLength, compare);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-      it('Should support fc.set(arb, minLength, maxLength)', () => {
-        fc.assert(
-          fc.property(fc.integer(), genericHelper.minMax(fc.nat(100)), (seed, minMaxLength) => {
-            const refArbitrary = set(nat(), { minLength: minMaxLength.min, maxLength: minMaxLength.max });
-            const nonRecommendedArbitrary = set(nat(), minMaxLength.min, minMaxLength.max);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-      it('Should support fc.set(arb, minLength, maxLength, compare)', () => {
-        fc.assert(
-          fc.property(fc.integer(), genericHelper.minMax(fc.nat(100)), (seed, minMaxLength) => {
-            const refArbitrary = set(string(), { minLength: minMaxLength.min, maxLength: minMaxLength.max, compare });
-            const nonRecommendedArbitrary = set(string(), minMaxLength.min, minMaxLength.max, compare);
-            expect(generateOneValue(seed, nonRecommendedArbitrary)).toEqual(generateOneValue(seed, refArbitrary));
-          })
-        );
-      });
-    });
-  });
-});