Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dubzzz/fast-check
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: dubzzz/fast-check
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.2.0
Choose a head ref
Loading
Showing with 2,069 additions and 1,291 deletions.
  1. +2 −3 .github/PULL_REQUEST_TEMPLATE.md
  2. +56 −10 .github/dependabot.yml
  3. +20 −0 .github/stale.yml
  4. +1 −6 .travis.yml
  5. +36 −1 CHANGELOG.md
  6. +0 −1 README.md
  7. +17 −0 api-extractor.json
  8. +1 −2 example/005-race/todolist/model-based/AddItemCommand.ts
  9. +7 −7 example/package.json
  10. +395 −395 example/yarn.lock
  11. +3 −2 package.json
  12. +10 −0 postbuild/main.cjs
  13. +4 −3 prebuild/property.cjs
  14. +1 −0 prebuild/tuple.cjs
  15. +3 −0 src/check/arbitrary/ArrayArbitrary.ts
  16. +22 −4 src/check/arbitrary/AsyncSchedulerArbitrary.ts
  17. +11 −0 src/check/arbitrary/BigIntArbitrary.ts
  18. +1 −0 src/check/arbitrary/BooleanArbitrary.ts
  19. +11 −2 src/check/arbitrary/CharacterArbitrary.ts
  20. +4 −0 src/check/arbitrary/ConstantArbitrary.ts
  21. +8 −4 src/check/arbitrary/ContextArbitrary.ts
  22. +3 −1 src/check/arbitrary/DateArbitrary.ts
  23. +8 −2 src/check/arbitrary/DedupArbitrary.ts
  24. +3 −0 src/check/arbitrary/DictionaryArbitrary.ts
  25. +3 −1 src/check/arbitrary/EmailArbitrary.ts
  26. +11 −7 src/check/arbitrary/FalsyArbitrary.ts
  27. +14 −0 src/check/arbitrary/FloatingPointArbitrary.ts
  28. +14 −6 src/check/arbitrary/FrequencyArbitrary.ts
  29. +11 −5 src/check/arbitrary/FunctionArbitrary.ts
  30. +5 −4 src/check/arbitrary/HostArbitrary.ts
  31. +12 −0 src/check/arbitrary/IntegerArbitrary.ts
  32. +10 −8 src/check/arbitrary/IpArbitrary.ts
  33. +2 −0 src/check/arbitrary/LetRecArbitrary.ts
  34. +11 −3 src/check/arbitrary/LoremArbitrary.ts
  35. +2 −0 src/check/arbitrary/MapToConstantArbitrary.ts
  36. +5 −2 src/check/arbitrary/MemoArbitrary.ts
  37. +6 −0 src/check/arbitrary/MixedCaseArbitrary.ts
  38. +50 −19 src/check/arbitrary/ObjectArbitrary.ts
  39. +7 −4 src/check/arbitrary/OneOfArbitrary.ts
  40. +13 −0 src/check/arbitrary/OptionArbitrary.ts
  41. +18 −5 src/check/arbitrary/RecordArbitrary.ts
  42. +18 −0 src/check/arbitrary/SetArbitrary.ts
  43. +3 −0 src/check/arbitrary/StreamArbitrary.ts
  44. +58 −3 src/check/arbitrary/StringArbitrary.ts
  45. +12 −0 src/check/arbitrary/SubarrayArbitrary.ts
  46. +3 −0 src/check/arbitrary/TupleArbitrary.generic.ts
  47. +6 −2 src/check/arbitrary/UuidArbitrary.ts
  48. +27 −10 src/check/arbitrary/WebArbitrary.ts
  49. +2 −0 src/check/arbitrary/definition/Arbitrary.ts
  50. +6 −0 src/check/arbitrary/definition/ArbitraryWithShrink.ts
  51. +1 −2 src/check/arbitrary/definition/BiasedArbitraryWrapper.ts
  52. +5 −3 src/check/arbitrary/definition/Shrinkable.ts
  53. +3 −3 src/check/arbitrary/helpers/ShrinkNumeric.ts
  54. +40 −24 src/check/model/ModelRunner.ts
  55. +6 −0 src/check/model/command/AsyncCommand.ts
  56. +6 −0 src/check/model/command/Command.ts
  57. +4 −0 src/check/model/command/ICommand.ts
  58. +18 −9 src/check/model/commands/CommandsArbitrary.ts
  59. +4 −3 src/check/model/commands/{CommandsSettings.ts → CommandsContraints.ts}
  60. +1 −2 src/check/model/commands/ScheduledCommand.ts
  61. +3 −2 src/check/precondition/Pre.ts
  62. +1 −0 src/check/precondition/PreconditionFailure.ts
  63. +35 −8 src/check/property/AsyncProperty.generic.ts
  64. +2 −2 src/check/property/AsyncProperty.ts
  65. +4 −1 src/check/property/IRawProperty.ts
  66. +54 −23 src/check/property/Property.generic.ts
  67. +2 −2 src/check/property/Property.ts
  68. +36 −3 src/check/runner/Runner.ts
  69. +2 −1 src/check/runner/RunnerIterator.ts
  70. +9 −5 src/check/runner/Sampler.ts
  71. +1 −1 src/check/runner/SourceValuesIterator.ts
  72. +16 −6 src/check/runner/configuration/GlobalParameters.ts
  73. +8 −7 src/check/runner/configuration/Parameters.ts
  74. +2 −2 src/check/runner/configuration/QualifiedParameters.ts
  75. +3 −1 src/check/runner/configuration/RandomType.ts
  76. +3 −2 src/check/runner/configuration/VerbosityLevel.ts
  77. +1 −0 src/check/runner/reporter/ExecutionStatus.ts
  78. +1 −0 src/check/runner/reporter/ExecutionTree.ts
  79. +39 −17 src/check/runner/reporter/RunDetails.ts
  80. +2 −2 src/check/runner/reporter/RunExecution.ts
  81. +10 −4 src/check/runner/utils/RunDetailsFormatter.ts
  82. +2 −0 src/check/symbols.ts
  83. +85 −24 src/fast-check-default.ts
  84. +6 −0 src/random/generator/Random.ts
  85. +3 −1 src/stream/LazyIterableIterator.ts
  86. +9 −0 src/stream/Stream.ts
  87. +1 −1 src/utils/globalThis.ts
  88. +4 −1 src/utils/hash.ts
  89. +4 −1 src/utils/stringify.ts
  90. +3 −3 test/esm/node-extension-cjs/yarn.lock
  91. +3 −3 test/esm/node-extension-mjs/yarn.lock
  92. +3 −3 test/esm/node-with-import/yarn.lock
  93. +3 −3 test/esm/node-with-require/yarn.lock
  94. +3 −3 test/esm/rollup-with-import/package.json
  95. +35 −36 test/esm/rollup-with-import/yarn.lock
  96. +3 −3 test/esm/rollup-with-require/package.json
  97. +35 −36 test/esm/rollup-with-require/yarn.lock
  98. +27 −27 test/esm/webpack-with-import/yarn.lock
  99. +27 −27 test/esm/webpack-with-require/yarn.lock
  100. +3 −3 test/legacy/typescript-3.2/yarn.lock
  101. +30 −30 test/type/yarn.lock
  102. +7 −0 test/unit/check/model/ReplayPath.spec.ts
  103. +44 −0 test/unit/check/runner/Runner.spec.ts
  104. +10 −0 test/unit/utils/hash.spec.ts
  105. +441 −429 yarn.lock
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Why is this PR for?

Describe the reason of this PR or give a link towards the associated issue.
<!-- Why is this PR for? -->
<!-- Describe the reason why you opened this PR or give a link towards the associated issue. -->

## In a nutshell

66 changes: 56 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -11,63 +11,109 @@ updates:
interval: "daily"
commit-message:
prefix: "⬆️"

- package-ecosystem: "npm"
directory: "/example"
schedule:
interval: "daily"
interval: "monthly"
commit-message:
prefix: "⬆️"

- package-ecosystem: "npm"
directory: "/test/type"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/node-extension-cjs"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/node-extension-mjs"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/node-with-import"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/node-with-require"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/rollup-with-import"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/rollup-with-require"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/webpack-with-import"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"

- package-ecosystem: "npm"
directory: "/test/esm/webpack-with-require"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
prefix: "⬆️"
ignore:
# we run this test against a linked version of fast-check
# by using `yarn link "fast-check"`
- dependency-name: "fast-check"
20 changes: 20 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "✔️ Feature Accepted"
- "✔️ Bug Confirmed"
- "✔️ Idea to investigate"
# Label to use when marking an issue as stale
staleLabel:
- "❌ Can't Reproduce"
- "❌ Feature Rejected"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -11,12 +11,6 @@ cache:

if: branch = master OR branch =~ ^next- OR branch =~ ^fix-v\d+\. OR tag =~ ^v\d+\.

before_install:
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn=1.19.1-1

script:
- yarn prebuild
- yarn build
@@ -87,6 +81,7 @@ jobs:
script:
- yarn prebuild
- yarn build:publish-types
- node postbuild/main.cjs
- yarn docs
deploy:
provider: pages
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
# 2.2.0

_Export missing typings and various cleaning around the tsdoc_
[[Code](https://github.com/dubzzz/fast-check/tree/v2.2.0)][[Diff](https://github.com/dubzzz/fast-check/compare/v2.1.0...v2.2.0)]

## Features

- ([PR#880](https://github.com/dubzzz/fast-check/pull/880)) Publish missing constraints types (option, scheduler)
- ([PR#881](https://github.com/dubzzz/fast-check/pull/881)) Add an interface to better type (Async)Property
- ([PR#902](https://github.com/dubzzz/fast-check/pull/902)) Standardize exported typings and add missing ones :warning:
- ([PR#906](https://github.com/dubzzz/fast-check/pull/906)) Prefer interfaces and functions for exported entities

## Fixes

- ([PR#904](https://github.com/dubzzz/fast-check/pull/904)) Bug: Asynchrorous properties should be able to use `asyncReporter`
- ([PR#850](https://github.com/dubzzz/fast-check/pull/850)) CI: Ignore fast-check bumps for some directories
- ([PR#872](https://github.com/dubzzz/fast-check/pull/872)) CI: Slow down dependabot frequency
- ([PR#879](https://github.com/dubzzz/fast-check/pull/879)) CI: Remove unneeded before_install step on .travis.yml
- ([PR#882](https://github.com/dubzzz/fast-check/pull/882)) CI: Apply post-build script before generating the doc
- ([PR#903](https://github.com/dubzzz/fast-check/pull/903)) CI: Break CI whenever documentation compiles with warnings
- ([PR#905](https://github.com/dubzzz/fast-check/pull/905)) CI: Enable protobot-stale
- ([PR#873](https://github.com/dubzzz/fast-check/pull/873)) Doc: Remove snyk badge
- ([PR#878](https://github.com/dubzzz/fast-check/pull/878)) Doc: Fix some of the warnings raised by API Extractor
- ([PR#883](https://github.com/dubzzz/fast-check/pull/883)) Doc: Update the template for new Pull Requests
- ([PR#894](https://github.com/dubzzz/fast-check/pull/894)) Doc: Fix warnings related to invalid references raised by api-extractor
- ([PR#907](https://github.com/dubzzz/fast-check/pull/907)) Doc: Fix examples leaking in to functions table
- ([PR#908](https://github.com/dubzzz/fast-check/pull/908)) Doc: Document non-documented sections
- ([PR#911](https://github.com/dubzzz/fast-check/pull/911)) Doc: Remove useless "fast-check#" prefix in @link
- ([PR#848](https://github.com/dubzzz/fast-check/pull/848)) Test: Do not use `@testing-library/dom` directly in `examples/`
- ([PR#851](https://github.com/dubzzz/fast-check/pull/851)) Test: Reduce coverage flakiness on `ReplayPath.ts`
- ([PR#874](https://github.com/dubzzz/fast-check/pull/874)) Test: Reduce coverage flakiness on `hash.ts`
- ([PR#893](https://github.com/dubzzz/fast-check/pull/893)) Tool: Add script to serve the generated documentation locally

---

# 2.1.0

_Better reported errors for `func`, `compareFunc` and `compareBooleanFunc`_
[[Code](https://github.com/dubzzz/fast-check/tree/v2.0.0)][[Diff](https://github.com/dubzzz/fast-check/compare/v2.0.0...v2.1.0)]
[[Code](https://github.com/dubzzz/fast-check/tree/v2.1.0)][[Diff](https://github.com/dubzzz/fast-check/compare/v2.0.0...v2.1.0)]

## Features

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ Property based testing framework for JavaScript/TypeScript
<a href="https://coveralls.io/github/dubzzz/fast-check"><img src="https://coveralls.io/repos/github/dubzzz/fast-check/badge.svg" alt="Coverage Status" /></a>
<a href="https://david-dm.org/dubzzz/fast-check"><img src="https://david-dm.org/dubzzz/fast-check/status.svg" alt="dependencies Status" /></a>
<a href="https://david-dm.org/dubzzz/fast-check?type=dev"><img src="https://david-dm.org/dubzzz/fast-check/dev-status.svg" alt="devDependencies Status" /></a>
<a href="https://snyk.io/test/github/dubzzz/fast-check?targetFile=package.json"><img src="https://snyk.io/test/github/dubzzz/fast-check/badge.svg?targetFile=package.json" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/dubzzz/fast-check?targetFile=package.json" style="max-width:100%;"></a>
</p>
<p align="center">
<a href="https://github.com/dubzzz/fast-check/labels/good%20first%20issue"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a>
17 changes: 17 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -16,5 +16,22 @@
},
"apiReport": {
"enabled": false
},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "error"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "error"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "error"
}
}
}
}
3 changes: 1 addition & 2 deletions example/005-race/todolist/model-based/AddItemCommand.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TodolistCommand, TodolistModel, TodolistReal, listTodos, sortTodos, ExtractedTodoItem } from './Model';
import { fireEvent } from '@testing-library/dom';
import { screen } from '@testing-library/react';
import { screen, fireEvent } from '@testing-library/react';

export class AddItemCommand implements TodolistCommand {
constructor(readonly label: string) {}
14 changes: 7 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -6,22 +6,22 @@
"test": "jest"
},
"dependencies": {
"@testing-library/dom": "^7.22.0",
"@testing-library/jest-dom": "^5.11.2",
"@testing-library/dom": "^7.22.1",
"@testing-library/jest-dom": "^5.11.3",
"@testing-library/react": "^10.4.8",
"@testing-library/user-event": "^12.1.0",
"@testing-library/user-event": "^12.1.1",
"fast-check": "*",
"lodash": "^4.17.19",
"pure-rand": "^3.0.0",
"pure-rand": "^3.1.0",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {
"@types/jest": "^26.0.9",
"@types/lodash": "^4.14.159",
"@types/react": "^16.9.44",
"jest": "^26.2.2",
"ts-jest": "^26.1.4",
"@types/react": "^16.9.46",
"jest": "^26.3.0",
"ts-jest": "^26.2.0",
"typescript": "^3.9.7"
},
"author": "Nicolas DUBIEN <github@dubien.org>",
Loading