From a055e7f97a82196130723d342d26446e8f57d169 Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Tue, 20 Feb 2018 20:27:17 +0100 Subject: [PATCH] Documentation record Fixes #45 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5cb52b4cd39..446bcac0391 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,7 @@ Strings that mimic real strings, with words and sentences: - `fc.set(arb: Arbitrary): Arbitrary`, `fc.set(arb: Arbitrary, maxLength: number): Arbitrary` or `fc.set(arb: Arbitrary, minLength: number, maxLength: number): Arbitrary` set of random length containing unique values generated by `arb`. All the values in the set are unique given the default `comparator = (a: T, b: T) => a === b` which can be overriden by giving another comparator function as the last argument on previous signatures - `fc.tuple(arb1: Arbitrary, arb2: Arbitrary, ...): Arbitrary<[T1,T2,...]>` tuple generated by aggregating the values of `arbX` like `generate: () => [arb1.generate(), arb2.generate(), ...]`. This arbitrary perfectly handle shrinks and is able to shink on all the generators - `fc.dictionary(keyArb: Arbitrary, valueArb: Arbitrary): Arbitrary<{[Key:string]:T}>` dictionary containing keys generated using `keyArb` and values gneerated by `valueArb` +- `fc.record(recordModel: {[Key:string]: Arbitrary}): Arbitrary<{[Key:string]: T}>` or `fc.record(recordModel: {[Key:string]: Arbitrary}, constraints: RecordConstraints): Arbitrary<{[Key:string]: T}>` record using the incoming arbitraries to generate its values. It comes very useful when dealing with settings. It takes an optional parameter of type `RecordConstraints` to configure some of its properties. The setting `with_deleted_keys=true` instructs the record generator that it can omit some keys ### Objects (:any)