Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dubzzz/fast-check
/ functions
Functions
1,889 in github.com/dubzzz/fast-check
⨍
Functions
1,889
◇
Types & classes
388
↓ 259 callers
Method
map
* Map all elements of the Stream using `f` * * WARNING: It closes the current stream * * @param f - Mapper function * @remarks Since 0.
packages/fast-check/src/stream/Stream.ts:71
↓ 118 callers
Method
push
(v: T)
packages/fast-check/test/e2e/ModelBased.spec.ts:6
↓ 89 callers
Method
join
* Join `others` Stream to the current Stream * * WARNING: It closes the current stream and the other ones (as soon as it iterates over them)
packages/fast-check/src/stream/Stream.ts:215
↓ 76 callers
Method
filter
(f: (v: T) => v is U)
packages/fast-check/src/stream/Stream.ts:167
↓ 75 callers
Method
generate
* Generate values of type Ts * * @param mrng - Random number generator * @param runId - Id of the generation, starting at 0 - if set the gene
packages/fast-check/src/check/property/IRawProperty.ts:49
↓ 62 callers
Method
nil
* Create an empty stream of T * @remarks Since 0.0.1
packages/fast-check/src/stream/Stream.ts:25
↓ 61 callers
Function
fakeArbitrary
()
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryHelpers.ts:34
↓ 51 callers
Method
shrink
* Shrink value of type Ts * * @param value - The value to be shrunk, it can be context-less * * @remarks Since 3.0.0
packages/fast-check/src/check/property/IRawProperty.ts:58
↓ 49 callers
Function
assertProduceCorrectValues
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, isCorrect: (v: T, extraParameters: U, arb: Arbit
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:84
↓ 49 callers
Function
assertProduceSameValueGivenSameSeed
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, options: { isEqual?: (v1: T, v2: T, extraPar
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:32
↓ 41 callers
Method
check
* Check if the model is in the right state to apply the command * * WARNING: does not change the model * * @param m - Model, simplified or
packages/fast-check/src/check/model/command/ICommand.ts:21
↓ 40 callers
Function
assertProduceValuesShrinkableWithoutContext
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, options: { extraParameters?: fc.Arbitrary<U>
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:176
↓ 40 callers
Function
safePush
(instance: T[], ...args: T[])
packages/fast-check/src/utils/globals.ts:197
↓ 39 callers
Method
of
* Create a stream of T from a variable number of elements * * @param elements - Elements used to create the Stream * @remarks Since 2.12.0
packages/fast-check/src/stream/Stream.ts:35
↓ 39 callers
Method
toString
* Name of the command * @remarks Since 1.5.0
packages/fast-check/src/check/model/command/ICommand.ts:39
↓ 36 callers
Function
safeApply
( f: (this: T, ...args: TArgs) => TReturn, instance: T, args: TArgs, )
packages/fast-check/src/utils/apply.ts:39
↓ 36 callers
Method
stringify
Stringify a replayPath
packages/fast-check/src/check/model/ReplayPath.ts:17
↓ 33 callers
Function
assertShrinkProducesSameValueWithoutInitialContext
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, options: { isEqual?: (v1: T, v2: T, extraPar
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:165
↓ 31 callers
Method
from
(warbs: _WeightedArbitrary<T>[], constraints: _Constraints, label: string)
packages/fast-check/src/arbitrary/_internals/FrequencyArbitrary.ts:23
↓ 31 callers
Method
has
* Check whether one of the elements of the Stream is successful for `f` * * WARNING: It closes the current stream * * @param f - Condition
packages/fast-check/src/stream/Stream.ts:197
↓ 29 callers
Function
declareCleaningHooksForSpies
()
packages/fast-check/test/unit/arbitrary/__test-helpers__/SpyCleaner.ts:8
↓ 27 callers
Function
fakeRandom
()
packages/fast-check/test/unit/arbitrary/__test-helpers__/RandomHelpers.ts:5
↓ 27 callers
Method
next
()
packages/fast-check/src/random/generator/RandomGenerator.ts:7
↓ 25 callers
Method
nextInt
(min?: number, max?: number)
packages/fast-check/src/random/generator/Random.ts:65
↓ 24 callers
Function
buildAdventOfTheDay
(options: Options)
website/blog/2024-12-01-advent-of-pbt-day-1/AdventOfTheDayBuilder.tsx:22
↓ 24 callers
Method
clone
()
packages/fast-check/src/random/generator/RandomGenerator.ts:6
↓ 24 callers
Function
tuple
(...arbs: { [K in keyof Ts]: Arbitrary<Ts[K]> })
packages/fast-check/src/arbitrary/tuple.ts:12
↓ 22 callers
Function
beforeEach
(fn: BeforeEachHook)
packages/fast-check/src/check/plugin/LifeCyclePlugins.ts:196
↓ 22 callers
Function
buildShrinkTree
( arb: Arbitrary<T>, v: Value<T>, lengthLimiter: { numItems: number } = { numItems: Number.POSITIVE_INFI
packages/fast-check/test/unit/arbitrary/__test-helpers__/ShrinkTree.ts:9
↓ 22 callers
Function
safeJoin
(instance: T[], ...args: [separator?: string | undefined])
packages/fast-check/src/utils/globals.ts:169
↓ 22 callers
Function
safeMap
(instance: T[], fn: (value: T, index: number, array: T[]) => U)
packages/fast-check/src/utils/globals.ts:175
↓ 21 callers
Function
stringify
(value: Ts)
packages/fast-check/src/utils/stringify.ts:355
↓ 20 callers
Method
log
* Log execution details during a test. * Very helpful when troubleshooting failures * @param data - Data to be logged into the current context
packages/fast-check/src/arbitrary/context.ts:17
↓ 20 callers
Function
renderTree
(tree: ShrinkTree<T>)
packages/fast-check/test/unit/arbitrary/__test-helpers__/ShrinkTree.ts:28
↓ 19 callers
Method
every
* Check whether all elements of the Stream are successful for `f` * * WARNING: It closes the current stream * * @param f - Condition to ch
packages/fast-check/src/stream/Stream.ts:180
↓ 19 callers
Function
hasCloneMethod
(instance: T | WithCloneMethod<T>)
packages/fast-check/src/check/symbols.ts:30
↓ 17 callers
Function
array
* For arrays of values coming from `arb` * * @param arb - Arbitrary used to generate the values inside the array * @param constraints - Constraints
packages/fast-check/src/arbitrary/array.ts:78
↓ 17 callers
Function
constant
(value: T)
packages/fast-check/src/arbitrary/constant.ts:10
↓ 17 callers
Function
propertyFor
( url: URL, options?: PropertyForOptions, )
packages/worker/src/main.ts:136
↓ 17 callers
Method
run
* Receive the non-updated model and the real or system under test. * Perform the checks post-execution - Throw in case of invalid state. * Updat
packages/fast-check/src/check/model/command/ICommand.ts:33
↓ 17 callers
Function
string
(constraints: StringConstraints = {})
packages/fast-check/src/arbitrary/string.ts:68
↓ 16 callers
Function
assert
(property: IAsyncProperty<Ts> | IProperty<Ts>, params?: Parameters<Ts>)
packages/worker/src/main.ts:39
↓ 16 callers
Function
integer
(constraints: IntegerConstraints = {})
packages/fast-check/src/arbitrary/integer.ts:44
↓ 16 callers
Function
safeSplit
( instance: string, ...args: [separator: string | RegExp, limit?: number | undefined] )
packages/fast-check/src/utils/globals.ts:454
↓ 16 callers
Function
safeSubstring
(instance: string, ...args: [start: number, end?: number | undefined])
packages/fast-check/src/utils/globals.ts:481
↓ 15 callers
Function
resolve
()
packages/fast-check/test/unit/arbitrary/_internals/implementations/SchedulerImplem.spec.ts:16
↓ 14 callers
Function
property
* Instantiate a new {@link fast-check#IProperty} * @param predicate - Assess the success of the property. Would be considered falsy if it throws or i
packages/fast-check/src/check/property/Property.ts:15
↓ 14 callers
Function
safeSlice
(instance: T[], ...args: [start?: number | undefined, end?: number | undefined])
packages/fast-check/src/utils/globals.ts:215
↓ 13 callers
Method
beforeEach
* Define a function that should be called before all calls to the predicate * @param invalidHookFunction - Function to be called, please provide a
packages/fast-check/src/check/property/Property.generic.ts:45
↓ 13 callers
Method
canShrinkWithoutContext
(_value: unknown)
packages/fast-check/test/unit/arbitrary/chainUntil.spec.ts:57
↓ 13 callers
Method
canShrinkWithoutContext
(_value: unknown)
packages/fast-check/test/unit/arbitrary/_internals/CloneArbitrary.spec.ts:235
↓ 13 callers
Function
readConfigureGlobal
()
packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:127
↓ 13 callers
Method
take
* Take `n` first elements of the Stream * * WARNING: It closes the current stream * * @param n - Number of elements to take * @remarks
packages/fast-check/src/stream/Stream.ts:144
↓ 12 callers
Function
assertShrinkProducesStrictlySmallerValue
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, isStrictlySmaller: (vNew: T, vOld: T, extraParam
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:186
↓ 12 callers
Method
isFailure
(err: unknown)
packages/fast-check/src/check/precondition/PreconditionFailure.ts:16
↓ 12 callers
Function
oneof
( ...args: [...Ts] | [OneOfConstraints, ...Ts] )
packages/fast-check/src/arbitrary/oneof.ts:144
↓ 12 callers
Method
schedule
(task: Promise<T>, label?: string, metadata?: TMetaData, customAct?: SchedulerAct)
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:136
↓ 11 callers
Method
afterEach
* Define a function that should be called after all calls to the predicate * @param invalidHookFunction - Function to be called, please provide a v
packages/fast-check/src/check/property/Property.generic.ts:63
↓ 11 callers
Method
create
(value: number)
packages/fast-check/test/unit/check/arbitrary/definition/Arbitrary.itest.spec.ts:106
↓ 11 callers
Function
f
()
packages/fast-check/test/unit/arbitrary/scheduler.spec.ts:41
↓ 11 callers
Method
parse
Parse a serialized replayPath
packages/fast-check/src/check/model/ReplayPath.ts:10
↓ 11 callers
Function
typedIntArrayArbitraryArbitraryBuilder
( constraints: TypedIntArrayBuilderConstraints<TValue>, defaultMin: TValue, defaultMax: TValue, TypedA
packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts:15
↓ 10 callers
Function
f
(...args: TArgs)
packages/fast-check/src/arbitrary/func.ts:27
↓ 10 callers
Function
nat
(arg?: number | NatConstraints)
packages/fast-check/src/arbitrary/nat.ts:54
↓ 10 callers
Method
pop
()
packages/fast-check/test/e2e/ModelBased.spec.ts:7
↓ 10 callers
Function
safeMapGet
(instance: Map<T, U>, key: T)
packages/fast-check/src/utils/globals.ts:359
↓ 9 callers
Method
getNthOrLast
* Take the `nth` element of the Stream of the last (if it does not exist) * * WARNING: It closes the current stream * * @param nth - Posit
packages/fast-check/src/stream/Stream.ts:228
↓ 9 callers
Method
isAsync
* Is the property asynchronous? * * true in case of asynchronous property, false otherwise * @remarks Since 0.0.7
packages/fast-check/src/check/property/IRawProperty.ts:39
↓ 9 callers
Method
scheduleFunction
( asyncFunction: (...args: TArgs) => Promise<T>, customAct?: SchedulerAct, )
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:140
↓ 8 callers
Function
afterEach
(fn: AfterEachHook)
packages/fast-check/src/check/plugin/LifeCyclePlugins.ts:234
↓ 8 callers
Function
safeMapSet
(instance: Map<T, U>, key: T, value: U)
packages/fast-check/src/utils/globals.ts:353
↓ 8 callers
Method
size
()
packages/fast-check/test/e2e/ModelBased.spec.ts:8
↓ 8 callers
Function
uniqueArray
(arb: Arbitrary<T>, constraints: UniqueArrayConstraints<T, U> = {})
packages/fast-check/src/arbitrary/uniqueArray.ts:216
↓ 8 callers
Method
waitOne
(customAct?: SchedulerAct)
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:236
↓ 7 callers
Function
act
()
packages/fast-check/test/unit/arbitrary/scheduler.spec.ts:62
↓ 7 callers
Function
buildConfigFor
(pkg, dirname, replacementsFor)
rolldown.common.config.js:8
↓ 7 callers
Function
cloneIfNeeded
(instance: T)
packages/fast-check/src/check/symbols.ts:48
↓ 7 callers
Function
doubleToIndex
(d: number)
packages/fast-check/src/arbitrary/_internals/helpers/DoubleHelpers.ts:83
↓ 7 callers
Function
floatToIndex
(f: number)
packages/fast-check/src/arbitrary/_internals/helpers/FloatHelpers.ts:82
↓ 7 callers
Function
makeLazy
(producer: () => IterableIterator<T>)
packages/fast-check/src/stream/LazyIterableIterator.ts:27
↓ 7 callers
Function
mapToConstant
(...entries: { num: number; build: (idInGroup: number) => T }[])
packages/fast-check/src/arbitrary/mapToConstant.ts:40
↓ 7 callers
Function
option
( arb: Arbitrary<T>, constraints: OptionConstraints<TNil> = {}, )
packages/fast-check/src/arbitrary/option.ts:60
↓ 7 callers
Method
waitAll
(customAct?: SchedulerAct)
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:242
↓ 7 callers
Function
walkTree
(tree: ShrinkTree<T>, visit: (t: T) => void)
packages/fast-check/test/unit/arbitrary/__test-helpers__/ShrinkTree.ts:48
↓ 6 callers
Function
constantFrom
(...values: Arrayfy<TArgs>)
packages/fast-check/src/arbitrary/constantFrom.ts:33
↓ 6 callers
Function
expectThrowWithCause
( promise: Promise<unknown>, errorCause: string | RegExp | Error, )
packages/worker/test/e2e/__test-helpers__/ThrowWithCause.ts:3
↓ 6 callers
Function
fakeArbitraryStaticValue
( value: () => T, context: () => unknown = () => undefined, )
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryHelpers.ts:42
↓ 6 callers
Method
getData
* Returns the underlying array containing the data * In general avoid re-using the CustomSet once you accessed it: * the array could be a copy o
packages/fast-check/src/arbitrary/_internals/interfaces/CustomSet.ts:20
↓ 6 callers
Function
leaf
(minValue: number, maxValue: number)
examples/002-recursive/isSearchTree/arbitraries/BinarySearchTreeArbitrary.ts:5
↓ 6 callers
Function
listTodos
()
examples/005-race/todolist/model-based/Model.ts:23
↓ 6 callers
Function
relativeSizeToSize
(size: Size | RelativeSize, defaultSize: Size)
packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts:101
↓ 6 callers
Method
runAfterEach
()
packages/fast-check/src/check/property/Property.generic.ts:135
↓ 6 callers
Method
runBeforeEach
()
packages/fast-check/src/check/property/Property.generic.ts:131
↓ 6 callers
Method
scheduleSequence
* Schedule a sequence of Promise to be executed sequencially. * Items within the sequence might be interleaved by other scheduled operations. *
packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts:53
↓ 6 callers
Function
stream
(g: IterableIterator<T>)
packages/fast-check/src/stream/Stream.ts:248
↓ 6 callers
Function
tree
(minValue: number, maxValue: number)
examples/002-recursive/isSearchTree/arbitraries/BinarySearchTreeArbitrary.ts:25
↓ 6 callers
Method
tryAdd
* Try to add the value, returns true if it did, false otherwise * @param value - The value to be added
packages/fast-check/src/arbitrary/_internals/interfaces/CustomSet.ts:10
↓ 5 callers
Function
bigInt
(...args: [] | [bigint, bigint] | [BigIntConstraints])
packages/fast-check/src/arbitrary/bigInt.ts:93
↓ 5 callers
Function
boolean
* For boolean values - `true` or `false` * @remarks Since 0.0.6 * @public
packages/fast-check/src/arbitrary/boolean.ts:21
↓ 5 callers
Method
build
()
packages/fast-check/test/e2e/Shadows.spec.ts:67
next →
1–100 of 1,889, ranked by callers