fast-check
Advanced tools
Comparing version 1.13.0 to 1.14.0
@@ -0,1 +1,15 @@ | ||
# 1.14.0 | ||
_New generated documentation and new arbitraries_ | ||
## Features | ||
- ([PR#339](https://github.com/dubzzz/fast-check/pull/339)) Add `fc.ipV4()` and `fc.ipV6()` arbitraries | ||
- ([PR#340](https://github.com/dubzzz/fast-check/pull/340)) Add `fc.mapToConstant()` arbitrary | ||
- ([PR#344](https://github.com/dubzzz/fast-check/pull/344)) Add `fc.webUrl()` and other web urls related arbitraries | ||
- ([PR#345](https://github.com/dubzzz/fast-check/pull/345)) Add `fc.emailAddress()` arbitrary | ||
- ([PR#343](https://github.com/dubzzz/fast-check/pull/343)) Generate the API documentation with docsify | ||
--- | ||
# 1.13.0 | ||
@@ -2,0 +16,0 @@ |
@@ -6,1 +6,2 @@ This file contains a list of people who've made non-trivial contribution to **fast-check** both with code or documentation. | ||
- [Nicolas Dubien](https://github.com/dubzzz) | ||
- [Gjorgji Kjosev](https://github.com/spion) |
@@ -16,7 +16,11 @@ import { pre } from './check/precondition/Pre'; | ||
import { dictionary } from './check/arbitrary/DictionaryArbitrary'; | ||
import { emailAddress } from './check/arbitrary/EmailArbitrary'; | ||
import { double, float } from './check/arbitrary/FloatingPointArbitrary'; | ||
import { frequency } from './check/arbitrary/FrequencyArbitrary'; | ||
import { compareBooleanFunc, compareFunc, func } from './check/arbitrary/FunctionArbitrary'; | ||
import { domain } from './check/arbitrary/HostArbitrary'; | ||
import { integer, maxSafeInteger, maxSafeNat, nat } from './check/arbitrary/IntegerArbitrary'; | ||
import { ipV4, ipV6 } from './check/arbitrary/IpArbitrary'; | ||
import { lorem } from './check/arbitrary/LoremArbitrary'; | ||
import { mapToConstant } from './check/arbitrary/MapToConstantArbitrary'; | ||
import { anything, json, jsonObject, object, ObjectConstraints, unicodeJson, unicodeJsonObject } from './check/arbitrary/ObjectArbitrary'; | ||
@@ -31,2 +35,3 @@ import { oneof } from './check/arbitrary/OneOfArbitrary'; | ||
import { genericTuple, tuple } from './check/arbitrary/TupleArbitrary'; | ||
import { webAuthority, webFragments, webQueryParameters, webSegment, webUrl } from './check/arbitrary/WebArbitrary'; | ||
import { commands } from './check/model/commands/CommandsArbitrary'; | ||
@@ -39,2 +44,2 @@ import { asyncModelRun, modelRun } from './check/model/ModelRunner'; | ||
import { Stream, stream } from './stream/Stream'; | ||
export { sample, statistics, check, assert, pre, property, asyncProperty, boolean, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, clonedConstant, option, oneof, frequency, dedup, shuffledSubarray, subarray, array, infiniteStream, set, tuple, genericTuple, record, dictionary, anything, object, json, jsonObject, unicodeJson, unicodeJsonObject, compareBooleanFunc, compareFunc, func, context, asyncModelRun, modelRun, commands, Arbitrary, Shrinkable, cloneMethod, ExecutionStatus, ObjectConstraints, Random, Stream, stream, VerbosityLevel }; | ||
export { sample, statistics, check, assert, pre, property, asyncProperty, boolean, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, clonedConstant, mapToConstant, option, oneof, frequency, dedup, shuffledSubarray, subarray, array, infiniteStream, set, tuple, genericTuple, record, dictionary, anything, object, json, jsonObject, unicodeJson, unicodeJsonObject, compareBooleanFunc, compareFunc, func, context, ipV4, ipV6, domain, webAuthority, webSegment, webFragments, webQueryParameters, webUrl, emailAddress, asyncModelRun, modelRun, commands, Arbitrary, Shrinkable, cloneMethod, ExecutionStatus, ObjectConstraints, Random, Stream, stream, VerbosityLevel }; |
@@ -46,2 +46,4 @@ "use strict"; | ||
exports.dictionary = DictionaryArbitrary_1.dictionary; | ||
var EmailArbitrary_1 = require("./check/arbitrary/EmailArbitrary"); | ||
exports.emailAddress = EmailArbitrary_1.emailAddress; | ||
var FloatingPointArbitrary_1 = require("./check/arbitrary/FloatingPointArbitrary"); | ||
@@ -56,2 +58,4 @@ exports.double = FloatingPointArbitrary_1.double; | ||
exports.func = FunctionArbitrary_1.func; | ||
var HostArbitrary_1 = require("./check/arbitrary/HostArbitrary"); | ||
exports.domain = HostArbitrary_1.domain; | ||
var IntegerArbitrary_1 = require("./check/arbitrary/IntegerArbitrary"); | ||
@@ -62,4 +66,9 @@ exports.integer = IntegerArbitrary_1.integer; | ||
exports.nat = IntegerArbitrary_1.nat; | ||
var IpArbitrary_1 = require("./check/arbitrary/IpArbitrary"); | ||
exports.ipV4 = IpArbitrary_1.ipV4; | ||
exports.ipV6 = IpArbitrary_1.ipV6; | ||
var LoremArbitrary_1 = require("./check/arbitrary/LoremArbitrary"); | ||
exports.lorem = LoremArbitrary_1.lorem; | ||
var MapToConstantArbitrary_1 = require("./check/arbitrary/MapToConstantArbitrary"); | ||
exports.mapToConstant = MapToConstantArbitrary_1.mapToConstant; | ||
var ObjectArbitrary_1 = require("./check/arbitrary/ObjectArbitrary"); | ||
@@ -98,2 +107,8 @@ exports.anything = ObjectArbitrary_1.anything; | ||
exports.tuple = TupleArbitrary_1.tuple; | ||
var WebArbitrary_1 = require("./check/arbitrary/WebArbitrary"); | ||
exports.webAuthority = WebArbitrary_1.webAuthority; | ||
exports.webFragments = WebArbitrary_1.webFragments; | ||
exports.webQueryParameters = WebArbitrary_1.webQueryParameters; | ||
exports.webSegment = WebArbitrary_1.webSegment; | ||
exports.webUrl = WebArbitrary_1.webUrl; | ||
var CommandsArbitrary_1 = require("./check/model/commands/CommandsArbitrary"); | ||
@@ -100,0 +115,0 @@ exports.commands = CommandsArbitrary_1.commands; |
@@ -18,7 +18,11 @@ import { pre } from './check/precondition/Pre'; | ||
import { dictionary } from './check/arbitrary/DictionaryArbitrary'; | ||
import { emailAddress } from './check/arbitrary/EmailArbitrary'; | ||
import { double, float } from './check/arbitrary/FloatingPointArbitrary'; | ||
import { frequency } from './check/arbitrary/FrequencyArbitrary'; | ||
import { compareBooleanFunc, compareFunc, func } from './check/arbitrary/FunctionArbitrary'; | ||
import { domain } from './check/arbitrary/HostArbitrary'; | ||
import { integer, maxSafeInteger, maxSafeNat, nat } from './check/arbitrary/IntegerArbitrary'; | ||
import { ipV4, ipV6 } from './check/arbitrary/IpArbitrary'; | ||
import { lorem } from './check/arbitrary/LoremArbitrary'; | ||
import { mapToConstant } from './check/arbitrary/MapToConstantArbitrary'; | ||
import { anything, json, jsonObject, object, ObjectConstraints, unicodeJson, unicodeJsonObject } from './check/arbitrary/ObjectArbitrary'; | ||
@@ -33,2 +37,3 @@ import { oneof } from './check/arbitrary/OneOfArbitrary'; | ||
import { genericTuple, tuple } from './check/arbitrary/TupleArbitrary'; | ||
import { webAuthority, WebAuthorityConstraints, webFragments, webQueryParameters, webSegment, webUrl, WebUrlConstraints } from './check/arbitrary/WebArbitrary'; | ||
import { AsyncCommand } from './check/model/command/AsyncCommand'; | ||
@@ -45,2 +50,2 @@ import { Command } from './check/model/command/Command'; | ||
import { Stream, stream } from './stream/Stream'; | ||
export { sample, statistics, check, assert, pre, property, asyncProperty, boolean, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, clonedConstant, option, oneof, frequency, dedup, shuffledSubarray, subarray, array, infiniteStream, set, tuple, genericTuple, record, dictionary, anything, object, json, jsonObject, unicodeJson, unicodeJsonObject, compareBooleanFunc, compareFunc, func, context, AsyncCommand, Command, ICommand, asyncModelRun, modelRun, commands, Arbitrary, Shrinkable, cloneMethod, Context, ExecutionStatus, ExecutionTree, ObjectConstraints, Parameters, RecordConstraints, RunDetails, Random, Stream, stream, VerbosityLevel }; | ||
export { sample, statistics, check, assert, pre, property, asyncProperty, boolean, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, clonedConstant, mapToConstant, option, oneof, frequency, dedup, shuffledSubarray, subarray, array, infiniteStream, set, tuple, genericTuple, record, dictionary, anything, object, json, jsonObject, unicodeJson, unicodeJsonObject, compareBooleanFunc, compareFunc, func, context, ipV4, ipV6, domain, webAuthority, webSegment, webFragments, webQueryParameters, webUrl, emailAddress, AsyncCommand, Command, ICommand, asyncModelRun, modelRun, commands, Arbitrary, Shrinkable, cloneMethod, Context, ExecutionStatus, ExecutionTree, ObjectConstraints, Parameters, RecordConstraints, WebAuthorityConstraints, WebUrlConstraints, RunDetails, Random, Stream, stream, VerbosityLevel }; |
@@ -18,7 +18,11 @@ import { pre } from './check/precondition/Pre'; | ||
import { dictionary } from './check/arbitrary/DictionaryArbitrary'; | ||
import { emailAddress } from './check/arbitrary/EmailArbitrary'; | ||
import { double, float } from './check/arbitrary/FloatingPointArbitrary'; | ||
import { frequency } from './check/arbitrary/FrequencyArbitrary'; | ||
import { compareBooleanFunc, compareFunc, func } from './check/arbitrary/FunctionArbitrary'; | ||
import { domain } from './check/arbitrary/HostArbitrary'; | ||
import { integer, maxSafeInteger, maxSafeNat, nat } from './check/arbitrary/IntegerArbitrary'; | ||
import { ipV4, ipV6 } from './check/arbitrary/IpArbitrary'; | ||
import { lorem } from './check/arbitrary/LoremArbitrary'; | ||
import { mapToConstant } from './check/arbitrary/MapToConstantArbitrary'; | ||
import { anything, json, jsonObject, object, ObjectConstraints, unicodeJson, unicodeJsonObject } from './check/arbitrary/ObjectArbitrary'; | ||
@@ -33,2 +37,3 @@ import { oneof } from './check/arbitrary/OneOfArbitrary'; | ||
import { genericTuple, tuple } from './check/arbitrary/TupleArbitrary'; | ||
import { webAuthority, WebAuthorityConstraints, webFragments, webQueryParameters, webSegment, webUrl, WebUrlConstraints } from './check/arbitrary/WebArbitrary'; | ||
import { AsyncCommand } from './check/model/command/AsyncCommand'; | ||
@@ -45,2 +50,2 @@ import { Command } from './check/model/command/Command'; | ||
import { Stream, stream } from './stream/Stream'; | ||
export { sample, statistics, check, assert, pre, property, asyncProperty, boolean, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, clonedConstant, option, oneof, frequency, dedup, shuffledSubarray, subarray, array, infiniteStream, set, tuple, genericTuple, record, dictionary, anything, object, json, jsonObject, unicodeJson, unicodeJsonObject, compareBooleanFunc, compareFunc, func, context, AsyncCommand, Command, ICommand, asyncModelRun, modelRun, commands, Arbitrary, Shrinkable, cloneMethod, Context, ExecutionStatus, ExecutionTree, ObjectConstraints, Parameters, RecordConstraints, RunDetails, Random, Stream, stream, VerbosityLevel }; | ||
export { sample, statistics, check, assert, pre, property, asyncProperty, boolean, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, clonedConstant, mapToConstant, option, oneof, frequency, dedup, shuffledSubarray, subarray, array, infiniteStream, set, tuple, genericTuple, record, dictionary, anything, object, json, jsonObject, unicodeJson, unicodeJsonObject, compareBooleanFunc, compareFunc, func, context, ipV4, ipV6, domain, webAuthority, webSegment, webFragments, webQueryParameters, webUrl, emailAddress, AsyncCommand, Command, ICommand, asyncModelRun, modelRun, commands, Arbitrary, Shrinkable, cloneMethod, Context, ExecutionStatus, ExecutionTree, ObjectConstraints, Parameters, RecordConstraints, WebAuthorityConstraints, WebUrlConstraints, RunDetails, Random, Stream, stream, VerbosityLevel }; |
{ | ||
"name": "fast-check", | ||
"version": "1.13.0", | ||
"version": "1.14.0", | ||
"description": "Property based testing framework for JavaScript (like QuickCheck)", | ||
@@ -30,3 +30,3 @@ "main": "lib/fast-check.js", | ||
"coverage": "cat ./coverage/lcov.info | coveralls", | ||
"docs": "typedoc --options typedoc.json ./src/", | ||
"docs": "mkdir -p docs/2-API && docsify-init --editDir documentation && cp -R documentation/* docs/ && api-extractor run --local && generate-ts-docs markdown -i docs/2-API -o docs/2-API && cat README.md | sed 's/https:\\/\\/github.com\\/dubzzz\\/fast-check\\/blob\\/master\\/documentation//g' > docs/README.md && markdownbars -i docs/_sidebar.md -o docs/_sidebar.md", | ||
"format": "prettier --write \"**/*.{js,ts}\"", | ||
@@ -54,2 +54,3 @@ "format:check": "prettier --list-different \"**/*.{js,ts}\"", | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.0.39", | ||
"@types/jest": "^24.0.11", | ||
@@ -60,3 +61,5 @@ "@types/node": "^11.11.3", | ||
"coveralls": "^3.0.3", | ||
"docsify-tools": "^1.0.11", | ||
"jest": "^24.5.0", | ||
"markdownbars": "^1.0.6", | ||
"prettier": "1.16.4", | ||
@@ -63,0 +66,0 @@ "rollup": "^1.6.0", |
@@ -24,3 +24,3 @@ <h3 align="center"> | ||
Hands-on tutorial and definition of Property Based Testing: [:checkered_flag: see tutorial](https://github.com/dubzzz/fast-check/blob/master/documentation/HandsOnPropertyBased.md). | ||
Hands-on tutorial and definition of Property Based Testing: [:checkered_flag: see tutorial](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/HandsOnPropertyBased.md). | ||
@@ -78,7 +78,7 @@ Property based testing frameworks check the truthfulness of properties. A property is a statement like: *for all (x, y, ...) such as precondition(x, y, ...) holds property(x, y, ...) is true*. | ||
Useful documentations: | ||
- [:checkered_flag: Introduction to Property Based & Hands On](https://github.com/dubzzz/fast-check/blob/master/documentation/HandsOnPropertyBased.md) | ||
- [:hatching_chick: Built-in arbitraries](https://github.com/dubzzz/fast-check/blob/master/documentation/Arbitraries.md) | ||
- [:wrench: Custom arbitraries](https://github.com/dubzzz/fast-check/blob/master/documentation/AdvancedArbitraries.md) | ||
- [:running_man: Property based runners](https://github.com/dubzzz/fast-check/blob/master/documentation/Runners.md) | ||
- [:boom: Tips](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md) | ||
- [:checkered_flag: Introduction to Property Based & Hands On](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/HandsOnPropertyBased.md) | ||
- [:hatching_chick: Built-in arbitraries](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Arbitraries.md) | ||
- [:wrench: Custom arbitraries](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/AdvancedArbitraries.md) | ||
- [:running_man: Property based runners](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Runners.md) | ||
- [:boom: Tips](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md) | ||
- [:mag: Generated documentation](https://dubzzz.github.io/fast-check/) | ||
@@ -91,12 +91,12 @@ | ||
- **Types:** strong and up-to-date types - *thanks to TypeScript* | ||
- **Extendable:** easy `map` method to derive existing arbitraries while keeping shrink \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/AdvancedArbitraries.md#transform-values)\] - *some frameworks ask the user to provide both a->b and b->a mappings in order to keep a shrinker* | ||
- **Extendable:** kind of flatMap-operation called `chain` \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/AdvancedArbitraries.md#transform-arbitraries)\] - *able to bind the output of an arbitrary as input of another one while keeping the shrink working* | ||
- **Extendable:** precondition checks with `fc.pre(...)` \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md#filter-invalid-combinations-using-pre-conditions)\] - *filtering invalid entries can be done directly inside the check function if needed* | ||
- **Smart:** ability to shrink on `fc.oneof` \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Arbitraries.md#combinors-of-arbitraries-t)\] - *surprisingly some frameworks don't* | ||
- **Smart:** biased by default \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/AdvancedArbitraries.md#biased-arbitraries)\] - *by default it generates both small and large values, making it easier to dig into counterexamples without having to tweak a size parameter manually* | ||
- **Debug:** verbose mode \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md#opt-for-verbose-failures)\] - *easier troubleshooting with verbose mode enabled* | ||
- **Debug:** replay directly on the minimal counterexample \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md#replay-after-failure)\] - *no need to replay the whole sequence, you get directly the counterexample* | ||
- **Debug:** custom examples in addition of generated ones \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md#add-custom-examples-next-to-generated-ones)\] - *no need to duplicate the code to play the property on custom examples* | ||
- **Debug:** logger per predicate run \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md#log-within-a-predicate)\] - *simplify your troubleshoot with fc.context and its logging feature* | ||
- **Unique:** model based approach \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/Tips.md#model-based-testing-or-ui-test)\]\[[article](https://medium.com/criteo-labs/detecting-the-unexpected-in-web-ui-fuzzing-1f3822c8a3a5)\] - *use the power of property based testing to test UI, APIs or state machines* | ||
- **Extendable:** easy `map` method to derive existing arbitraries while keeping shrink \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/AdvancedArbitraries.md#transform-values)\] - *some frameworks ask the user to provide both a->b and b->a mappings in order to keep a shrinker* | ||
- **Extendable:** kind of flatMap-operation called `chain` \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/AdvancedArbitraries.md#transform-arbitraries)\] - *able to bind the output of an arbitrary as input of another one while keeping the shrink working* | ||
- **Extendable:** precondition checks with `fc.pre(...)` \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#filter-invalid-combinations-using-pre-conditions)\] - *filtering invalid entries can be done directly inside the check function if needed* | ||
- **Smart:** ability to shrink on `fc.oneof` \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Arbitraries.md#combinors-of-arbitraries-t)\] - *surprisingly some frameworks don't* | ||
- **Smart:** biased by default \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/AdvancedArbitraries.md#biased-arbitraries)\] - *by default it generates both small and large values, making it easier to dig into counterexamples without having to tweak a size parameter manually* | ||
- **Debug:** verbose mode \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#opt-for-verbose-failures)\] - *easier troubleshooting with verbose mode enabled* | ||
- **Debug:** replay directly on the minimal counterexample \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#replay-after-failure)\] - *no need to replay the whole sequence, you get directly the counterexample* | ||
- **Debug:** custom examples in addition of generated ones \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#add-custom-examples-next-to-generated-ones)\] - *no need to duplicate the code to play the property on custom examples* | ||
- **Debug:** logger per predicate run \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#log-within-a-predicate)\] - *simplify your troubleshoot with fc.context and its logging feature* | ||
- **Unique:** model based approach \[[more](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#model-based-testing-or-ui-test)\]\[[article](https://medium.com/criteo-labs/detecting-the-unexpected-in-web-ui-fuzzing-1f3822c8a3a5)\] - *use the power of property based testing to test UI, APIs or state machines* | ||
@@ -125,2 +125,2 @@ For more details, refer to the documentation in the links above. | ||
**[MORE: Issues detected thanks of fast-check](https://github.com/dubzzz/fast-check/blob/master/documentation/IssuesDiscovered.md)** | ||
**[MORE: Issues detected thanks of fast-check](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/IssuesDiscovered.md)** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
925326
341
16677
21