Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-check

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-check - npm Package Compare versions

Comparing version 3.8.1 to 3.8.2

31

CHANGELOG.md

@@ -0,1 +1,32 @@

# 3.8.2
_Rework documentation_
[[Code](https://github.com/dubzzz/fast-check/tree/v3.8.2)][[Diff](https://github.com/dubzzz/fast-check/compare/v3.8.1...v3.8.2)]
## Fixes
- ([PR#3780](https://github.com/dubzzz/fast-check/pull/3780)) CI: Do not relaunch build on new tag
- ([PR#3792](https://github.com/dubzzz/fast-check/pull/3792)) CI: Remove parse5 when checking types
- ([PR#3804](https://github.com/dubzzz/fast-check/pull/3804)) CI: Build documentation with LFS enabled
- ([PR#3800](https://github.com/dubzzz/fast-check/pull/3800)) Doc: Add "advanced" part of the documentation
- ([PR#3803](https://github.com/dubzzz/fast-check/pull/3803)) Doc: Update our-first-property-based-test.md: typo, punctuation
- ([PR#3828](https://github.com/dubzzz/fast-check/pull/3828)) Doc: Fix typos in docs
- ([PR#3820](https://github.com/dubzzz/fast-check/pull/3820)) Doc: First iteration on race conditions tutorial
- ([PR#3834](https://github.com/dubzzz/fast-check/pull/3834)) Doc: Rework intro of race condition tutorial
- ([PR#3836](https://github.com/dubzzz/fast-check/pull/3836)) Doc: Merge category and intro for race condition
- ([PR#3837](https://github.com/dubzzz/fast-check/pull/3837)) Doc: Replace categories by real pages
- ([PR#3838](https://github.com/dubzzz/fast-check/pull/3838)) Doc: Add video explaining race condition in UI
- ([PR#3842](https://github.com/dubzzz/fast-check/pull/3842)) Doc: Note about solving race conditions
- ([PR#3843](https://github.com/dubzzz/fast-check/pull/3843)) Doc: Better colors for dark theme
- ([PR#3850](https://github.com/dubzzz/fast-check/pull/3850)) Doc: Points to projects in our ecosystem
- ([PR#3852](https://github.com/dubzzz/fast-check/pull/3852)) Doc: List some bugs found thanks to fast-check
- ([PR#3860](https://github.com/dubzzz/fast-check/pull/3860)) Doc: Use GitHub logo instead of label
- ([PR#3858](https://github.com/dubzzz/fast-check/pull/3858)) Doc: Rework homepage page of fast-check.dev
- ([PR#3863](https://github.com/dubzzz/fast-check/pull/3863)) Doc: Rework display of the homepage for small screens
- ([PR#3864](https://github.com/dubzzz/fast-check/pull/3864)) Doc: Properly display the quick nav buttons
- ([PR#3871](https://github.com/dubzzz/fast-check/pull/3871)) Doc: Update all links to new documentation
- ([PR#3867](https://github.com/dubzzz/fast-check/pull/3867)) Doc: Create proper images in website/
- ([PR#3872](https://github.com/dubzzz/fast-check/pull/3872)) Doc: Reference image from LFS in README
- ([PR#3835](https://github.com/dubzzz/fast-check/pull/3835)) Test: Add tests for snippets in the website
# 3.8.1

@@ -2,0 +33,0 @@

4

lib/esm/fast-check-default.js

@@ -105,4 +105,4 @@ import { pre } from './check/precondition/Pre.js';

const __type = 'module';
const __version = '3.8.1';
const __commitHash = '5d4b1cada26f3a587ca03f18c6921dc256004009';
const __version = '3.8.2';
const __commitHash = '5793e1428a71928db1d4bfdb6591aa0009f5ae18';
export { __type, __version, __commitHash, sample, statistics, check, assert, pre, PreconditionFailure, property, asyncProperty, boolean, falsy, float, double, integer, nat, maxSafeInteger, maxSafeNat, bigIntN, bigUintN, bigInt, bigUint, char, ascii, char16bits, unicode, fullUnicode, hexa, base64, mixedCase, string, asciiString, string16bits, stringOf, unicodeString, fullUnicodeString, hexaString, base64String, lorem, constant, constantFrom, mapToConstant, option, oneof, clone, shuffledSubarray, subarray, array, sparseArray, infiniteStream, uniqueArray, tuple, record, dictionary, anything, object, json, jsonValue, unicodeJson, unicodeJsonValue, letrec, memo, compareBooleanFunc, compareFunc, func, context, gen, date, ipV4, ipV4Extended, ipV6, domain, webAuthority, webSegment, webFragments, webPath, webQueryParameters, webUrl, emailAddress, uuid, uuidV, int8Array, uint8Array, uint8ClampedArray, int16Array, uint16Array, int32Array, uint32Array, float32Array, float64Array, bigInt64Array, bigUint64Array, asyncModelRun, modelRun, scheduledModelRun, commands, scheduler, schedulerFor, Arbitrary, Value, cloneMethod, cloneIfNeeded, hasCloneMethod, toStringMethod, hasToStringMethod, asyncToStringMethod, hasAsyncToStringMethod, getDepthContextFor, stringify, asyncStringify, defaultReportMessage, asyncDefaultReportMessage, hash, VerbosityLevel, configureGlobal, readConfigureGlobal, resetConfigureGlobal, ExecutionStatus, Random, Stream, stream, createDepthIdentifier, };

@@ -231,5 +231,5 @@ "use strict";

exports.__type = __type;
const __version = '3.8.1';
const __version = '3.8.2';
exports.__version = __version;
const __commitHash = '5d4b1cada26f3a587ca03f18c6921dc256004009';
const __commitHash = '5793e1428a71928db1d4bfdb6591aa0009f5ae18';
exports.__commitHash = __commitHash;

@@ -121,3 +121,3 @@ import { pre } from './check/precondition/Pre';

/**
* Version of fast-check used by your project (eg.: 3.8.1)
* Version of fast-check used by your project (eg.: 3.8.2)
* @remarks Since 1.22.0

@@ -128,3 +128,3 @@ * @public

/**
* Commit hash of the current code (eg.: 5d4b1cada26f3a587ca03f18c6921dc256004009)
* Commit hash of the current code (eg.: 5793e1428a71928db1d4bfdb6591aa0009f5ae18)
* @remarks Since 2.7.0

@@ -131,0 +131,0 @@ * @public

{
"name": "fast-check",
"version": "3.8.1",
"version": "3.8.2",
"description": "Property based testing framework for JavaScript (like QuickCheck)",

@@ -59,13 +59,13 @@ "type": "commonjs",

"devDependencies": {
"@fast-check/poisoning": "0.0.6",
"@microsoft/api-extractor": "^7.34.4",
"@fast-check/poisoning": "0.0.7",
"@microsoft/api-extractor": "^7.34.9",
"@types/jest": "^29.5.1",
"@types/node": "^18.15.13",
"@types/node": "^18.16.10",
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"glob": "^10.2.1",
"glob": "^10.2.4",
"jest": "^29.5.0",
"replace-in-file": "^6.3.5",
"ts-jest": "^29.1.0",
"typedoc": "^0.24.4",
"typedoc": "^0.24.7",
"typescript": "^4.9.5"

@@ -72,0 +72,0 @@ },

<h1 align="center">
<img align="center" src="https://raw.githubusercontent.com/dubzzz/fast-check/main/packages/fast-check/documentation/images/logo.png" alt="fast-check logo" />
<img align="center" src="https://media.githubusercontent.com/media/dubzzz/fast-check/main/website/static/img/logo.png" alt="fast-check logo" />
</h1>

@@ -28,3 +28,3 @@

Hands-on tutorial and definition of Property Based Testing: [🏁 see tutorial](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/HandsOnPropertyBased.md). Or directly try it online on our pre-configured [CodeSandbox](https://codesandbox.io/s/github/dubzzz/fast-check/tree/main/examples?previewwindow=tests).
Hands-on tutorial and definition of Property Based Testing: [🏁 see tutorial](https://fast-check.dev/docs/tutorials/quick-start/). Or directly try it online on our pre-configured [CodeSandbox](https://codesandbox.io/s/github/dubzzz/fast-check/tree/main/examples?previewwindow=tests).

@@ -78,10 +78,9 @@ Property based testing frameworks check the truthfulness of properties. A property is a statement like: _for all (x, y, ...) such that precondition(x, y, ...) holds predicate(x, y, ...) is true_.

- [🏁 Introduction to Property Based & Hands On](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/HandsOnPropertyBased.md)
- [🐣 Built-in arbitraries](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Arbitraries.md)
- [🔧 Custom arbitraries](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/AdvancedArbitraries.md)
- [🏃‍♂️ Property based runners](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Runners.md)
- [💥 Tips](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Tips.md)
- [🔌 API Reference](https://fast-check.dev/)
- [⭐ Awesome fast-check](https://github.com/dubzzz/awesome-fast-check)
- [🤯 How fast-check works?](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/HowItWorks.md)
- [🏁 Introduction to Property Based & Hands On](https://fast-check.dev/docs/tutorials/quick-start/)
- [🐣 Built-in arbitraries](https://fast-check.dev/docs/core-blocks/arbitraries/)
- [🔧 Custom arbitraries](https://fast-check.dev/docs/core-blocks/arbitraries/combiners/)
- [🏃‍♂️ Property based runners](https://fast-check.dev/docs/core-blocks/runners/)
- [💥 Tips](https://fast-check.dev/docs/configuration/)
- [🔌 API Reference](https://fast-check.dev/api-reference/index.html)
- [⭐ Awesome fast-check](https://fast-check.dev/docs/ecosystem/)

@@ -93,15 +92,15 @@ ## Why should I migrate to fast-check?

- **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/main/packages/fast-check/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/main/packages/fast-check/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/main/packages/fast-check/documentation/Tips.md#filter-invalid-combinations-using-pre-conditions)\] - _filtering invalid entries can be done directly inside the check function if needed_
- **Extendable:** easily switch from fake data in tests to property based with `fc.gen()` \[[more](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Tips.md#generate-random-values-during-the-predicate)\] - _generate random values within your predicates_
- **Smart:** ability to shrink on `fc.oneof` \[[more](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Arbitraries.md#combinors-of-arbitraries-t)\] - _surprisingly some frameworks don't_
- **Smart:** biased by default \[[more](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/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/main/packages/fast-check/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/main/packages/fast-check/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/main/packages/fast-check/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/main/packages/fast-check/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/main/packages/fast-check/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_
- **Unique:** detect race conditions in your code \[[more](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Tips.md#detect-race-conditions)\] - _shuffle the way your promises and async calls resolve using the power of property based testing to detect races_
- **Unique:** simplify user definable corner cases \[[more](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/Tips.md#simplify-user-definable-corner-cases)\] - _simplify bug resolution by asking fast-check if it can find an even simpler corner case_
- **Extendable:** easy `map` method to derive existing arbitraries while keeping shrink \[[more](https://fast-check.dev/docs/core-blocks/arbitraries/combiners/any/#map)\] - _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://fast-check.dev/docs/core-blocks/arbitraries/combiners/any/#chain)\] - _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://fast-check.dev/docs/core-blocks/properties/#example)\] - _filtering invalid entries can be done directly inside the check function if needed_
- **Extendable:** easily switch from fake data in tests to property based with `fc.gen()` \[[more](https://fast-check.dev/docs/core-blocks/arbitraries/others/#gen)\] - _generate random values within your predicates_
- **Smart:** ability to shrink on `fc.oneof` \[[more](https://fast-check.dev/docs/core-blocks/arbitraries/combiners/any/#oneof)\] - _surprisingly some frameworks don't_
- **Smart:** biased by default - _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://fast-check.dev/docs/configuration/custom-reports/#verbosity)\]\[[tutorial](https://fast-check.dev/docs/tutorials/quick-start/read-test-reports/#how-to-increase-verbosity)\] - _easier troubleshooting with verbose mode enabled_
- **Debug:** replay directly on the minimal counterexample \[[tutorial](https://fast-check.dev/docs/tutorials/quick-start/read-test-reports/#how-to-re-run)\] - _no need to replay the whole sequence, you get directly the counterexample_
- **Debug:** custom examples in addition of generated ones \[[more](https://fast-check.dev/docs/configuration/user-definable-values/#run-against-custom-values)\] - _no need to duplicate the code to play the property on custom examples_
- **Debug:** logger per predicate run \[[more](https://fast-check.dev/docs/core-blocks/arbitraries/others/#context)\] - _simplify your troubleshoot with fc.context and its logging feature_
- **Unique:** model based approach \[[more](https://fast-check.dev/docs/advanced/model-based-testing/)\]\[[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_
- **Unique:** detect race conditions in your code \[[more](https://fast-check.dev/docs/advanced/race-conditions/)\]\[[tutorial](https://fast-check.dev/docs/tutorials/detect-race-conditions/)\] - _shuffle the way your promises and async calls resolve using the power of property based testing to detect races_
- **Unique:** simplify user definable corner cases \[[more](https://fast-check.dev/docs/configuration/user-definable-values/#shrink-custom-values)\] - _simplify bug resolution by asking fast-check if it can find an even simpler corner case_

@@ -112,7 +111,7 @@ For more details, refer to the documentation in the links above.

fast-check has been trusted for years by big projects like: [jest](https://github.com/facebook/jest), [jasmine](https://github.com/jasmine/jasmine), [fp-ts](https://github.com/gcanti/fp-ts), [io-ts](https://github.com/gcanti/io-ts), [ramda](https://github.com/ramda/ramda), [js-yaml](https://github.com/nodeca/js-yaml), [query-string](https://github.com/sindresorhus/query-string)...
fast-check has been trusted for years by big projects like: [jest](https://github.com/jestjs/jest), [jasmine](https://github.com/jasmine/jasmine), [fp-ts](https://github.com/gcanti/fp-ts), [io-ts](https://github.com/gcanti/io-ts), [ramda](https://github.com/ramda/ramda), [js-yaml](https://github.com/nodeca/js-yaml), [query-string](https://github.com/sindresorhus/query-string)...
### Powerful
It also proved useful in finding bugs among major open source projects such as [jest](https://github.com/facebook/jest), [query-string](https://github.com/sindresorhus/query-string)... and [many others](https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/IssuesDiscovered.md).
It also proved useful in finding bugs among major open source projects such as [jest](https://github.com/jestjs/jest), [query-string](https://github.com/sindresorhus/query-string)... and [many others](https://fast-check.dev/docs/introduction/track-record/).

@@ -219,2 +218,5 @@ ## Compatibility

<td align="center" valign="top" width="14.28%"><a href="https://github.com/tskj"><img src="https://avatars.githubusercontent.com/u/25415972?v=4?s=100" width="100px;" alt="Tarjei Skjærset"/><br /><sub><b>Tarjei Skjærset</b></sub></a><br /><a href="https://github.com/dubzzz/fast-check/commits?author=tskj" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://denisgorbachev.com/"><img src="https://avatars.githubusercontent.com/u/829578?v=4?s=100" width="100px;" alt="Denis Gorbachev"/><br /><sub><b>Denis Gorbachev</b></sub></a><br /><a href="https://github.com/dubzzz/fast-check/commits?author=DenisGorbachev" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://senocular.github.io/"><img src="https://avatars.githubusercontent.com/u/3536716?v=4?s=100" width="100px;" alt="Trevor McCauley"/><br /><sub><b>Trevor McCauley</b></sub></a><br /><a href="https://github.com/dubzzz/fast-check/commits?author=senocular" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://grantkiely.com/"><img src="https://avatars.githubusercontent.com/u/1948935?v=4?s=100" width="100px;" alt="Grant Kiely"/><br /><sub><b>Grant Kiely</b></sub></a><br /><a href="https://github.com/dubzzz/fast-check/commits?author=gkiely" title="Documentation">📖</a></td>
</tr>

@@ -221,0 +223,0 @@ </tbody>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc