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 1.0.0 to 1.0.1

CONTRIBUTING.md

1

lib/check/arbitrary/ArrayArbitrary.d.ts

@@ -8,2 +8,3 @@ import Random from '../../random/generator/Random';

readonly minLength: number;
readonly maxLength: number;
readonly preFilter: (tab: Shrinkable<T>[]) => Shrinkable<T>[];

@@ -10,0 +11,0 @@ readonly lengthArb: ArbitraryWithShrink<number>;

9

lib/check/arbitrary/ArrayArbitrary.js

@@ -44,2 +44,3 @@ "use strict";

_this.minLength = minLength;
_this.maxLength = maxLength;
_this.preFilter = preFilter;

@@ -72,5 +73,7 @@ _this.lengthArb = IntegerArbitrary_1.integer(minLength, maxLength);

.join(items[0].shrink().map(function (v) { return [v].concat(items.slice(1)); }))
.join(this.shrinkImpl(items.slice(1), false)
.filter(function (vs) { return _this.minLength <= vs.length + 1; })
.map(function (vs) { return [items[0]].concat(vs); }));
.join(items.length > this.minLength
? this.shrinkImpl(items.slice(1), false)
.filter(function (vs) { return _this.minLength <= vs.length + 1; })
.map(function (vs) { return [items[0]].concat(vs); })
: Stream_1.Stream.nil());
};

@@ -77,0 +80,0 @@ return ArrayArbitrary;

{
"name": "fast-check",
"version": "1.0.0",
"version": "1.0.1",
"description": "Property based testing framework in TypeScript (like QuickCheck)",

@@ -5,0 +5,0 @@ "main": "lib/fast-check.js",

@@ -42,2 +42,13 @@ # Fast Check

If you want to synchronize and build the code locally:
```bash
git clone https://github.com/dubzzz/fast-check.git && cd fast-check
npm install
npm run prebuild #generate missing implementations: tuple and properties
npm run build #compile the code in ./src, build the ./lib content
npm run test #run unit tests
npm run e2e #run end-to-end tests: check the code can shrink on errors, replay on failure...
```
## Usage

@@ -44,0 +55,0 @@

@@ -13,3 +13,3 @@ import Random from '../../random/generator/Random';

readonly minLength: number,
maxLength: number,
readonly maxLength: number,
readonly preFilter: (tab: Shrinkable<T>[]) => Shrinkable<T>[] = tab => tab

@@ -43,5 +43,7 @@ ) {

.join(
this.shrinkImpl(items.slice(1), false)
.filter(vs => this.minLength <= vs.length + 1)
.map(vs => [items[0]].concat(vs))
items.length > this.minLength
? this.shrinkImpl(items.slice(1), false)
.filter(vs => this.minLength <= vs.length + 1)
.map(vs => [items[0]].concat(vs))
: Stream.nil<Shrinkable<T>[]>()
);

@@ -48,0 +50,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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