MCPcopy Create free account

hub / github.com/dubzzz/fast-check / functions

Functions1,889 in github.com/dubzzz/fast-check

↓ 259 callersMethodmap
* 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 callersMethodpush
(v: T)
packages/fast-check/test/e2e/ModelBased.spec.ts:6
↓ 89 callersMethodjoin
* 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 callersMethodfilter
(f: (v: T) => v is U)
packages/fast-check/src/stream/Stream.ts:167
↓ 75 callersMethodgenerate
* 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 callersMethodnil
* Create an empty stream of T * @remarks Since 0.0.1
packages/fast-check/src/stream/Stream.ts:25
↓ 61 callersFunctionfakeArbitrary
()
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryHelpers.ts:34
↓ 51 callersMethodshrink
* 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 callersFunctionassertProduceCorrectValues
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, isCorrect: (v: T, extraParameters: U, arb: Arbit
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:84
↓ 49 callersFunctionassertProduceSameValueGivenSameSeed
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, options: { isEqual?: (v1: T, v2: T, extraPar
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:32
↓ 41 callersMethodcheck
* 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 callersFunctionassertProduceValuesShrinkableWithoutContext
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, options: { extraParameters?: fc.Arbitrary<U>
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:176
↓ 40 callersFunctionsafePush
(instance: T[], ...args: T[])
packages/fast-check/src/utils/globals.ts:197
↓ 39 callersMethodof
* 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 callersMethodtoString
* Name of the command * @remarks Since 1.5.0
packages/fast-check/src/check/model/command/ICommand.ts:39
↓ 36 callersFunctionsafeApply
( f: (this: T, ...args: TArgs) => TReturn, instance: T, args: TArgs, )
packages/fast-check/src/utils/apply.ts:39
↓ 36 callersMethodstringify
Stringify a replayPath
packages/fast-check/src/check/model/ReplayPath.ts:17
↓ 33 callersFunctionassertShrinkProducesSameValueWithoutInitialContext
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, options: { isEqual?: (v1: T, v2: T, extraPar
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:165
↓ 31 callersMethodfrom
(warbs: _WeightedArbitrary<T>[], constraints: _Constraints, label: string)
packages/fast-check/src/arbitrary/_internals/FrequencyArbitrary.ts:23
↓ 31 callersMethodhas
* 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 callersFunctiondeclareCleaningHooksForSpies
()
packages/fast-check/test/unit/arbitrary/__test-helpers__/SpyCleaner.ts:8
↓ 27 callersFunctionfakeRandom
()
packages/fast-check/test/unit/arbitrary/__test-helpers__/RandomHelpers.ts:5
↓ 27 callersMethodnext
()
packages/fast-check/src/random/generator/RandomGenerator.ts:7
↓ 25 callersMethodnextInt
(min?: number, max?: number)
packages/fast-check/src/random/generator/Random.ts:65
↓ 24 callersFunctionbuildAdventOfTheDay
(options: Options)
website/blog/2024-12-01-advent-of-pbt-day-1/AdventOfTheDayBuilder.tsx:22
↓ 24 callersMethodclone
()
packages/fast-check/src/random/generator/RandomGenerator.ts:6
↓ 24 callersFunctiontuple
(...arbs: { [K in keyof Ts]: Arbitrary<Ts[K]> })
packages/fast-check/src/arbitrary/tuple.ts:12
↓ 22 callersFunctionbeforeEach
(fn: BeforeEachHook)
packages/fast-check/src/check/plugin/LifeCyclePlugins.ts:196
↓ 22 callersFunctionbuildShrinkTree
( 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 callersFunctionsafeJoin
(instance: T[], ...args: [separator?: string | undefined])
packages/fast-check/src/utils/globals.ts:169
↓ 22 callersFunctionsafeMap
(instance: T[], fn: (value: T, index: number, array: T[]) => U)
packages/fast-check/src/utils/globals.ts:175
↓ 21 callersFunctionstringify
(value: Ts)
packages/fast-check/src/utils/stringify.ts:355
↓ 20 callersMethodlog
* 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 callersFunctionrenderTree
(tree: ShrinkTree<T>)
packages/fast-check/test/unit/arbitrary/__test-helpers__/ShrinkTree.ts:28
↓ 19 callersMethodevery
* 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 callersFunctionhasCloneMethod
(instance: T | WithCloneMethod<T>)
packages/fast-check/src/check/symbols.ts:30
↓ 17 callersFunctionarray
* 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 callersFunctionconstant
(value: T)
packages/fast-check/src/arbitrary/constant.ts:10
↓ 17 callersFunctionpropertyFor
( url: URL, options?: PropertyForOptions, )
packages/worker/src/main.ts:136
↓ 17 callersMethodrun
* 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 callersFunctionstring
(constraints: StringConstraints = {})
packages/fast-check/src/arbitrary/string.ts:68
↓ 16 callersFunctionassert
(property: IAsyncProperty<Ts> | IProperty<Ts>, params?: Parameters<Ts>)
packages/worker/src/main.ts:39
↓ 16 callersFunctioninteger
(constraints: IntegerConstraints = {})
packages/fast-check/src/arbitrary/integer.ts:44
↓ 16 callersFunctionsafeSplit
( instance: string, ...args: [separator: string | RegExp, limit?: number | undefined] )
packages/fast-check/src/utils/globals.ts:454
↓ 16 callersFunctionsafeSubstring
(instance: string, ...args: [start: number, end?: number | undefined])
packages/fast-check/src/utils/globals.ts:481
↓ 15 callersFunctionresolve
()
packages/fast-check/test/unit/arbitrary/_internals/implementations/SchedulerImplem.spec.ts:16
↓ 14 callersFunctionproperty
* 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 callersFunctionsafeSlice
(instance: T[], ...args: [start?: number | undefined, end?: number | undefined])
packages/fast-check/src/utils/globals.ts:215
↓ 13 callersMethodbeforeEach
* 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 callersMethodcanShrinkWithoutContext
(_value: unknown)
packages/fast-check/test/unit/arbitrary/chainUntil.spec.ts:57
↓ 13 callersMethodcanShrinkWithoutContext
(_value: unknown)
packages/fast-check/test/unit/arbitrary/_internals/CloneArbitrary.spec.ts:235
↓ 13 callersFunctionreadConfigureGlobal
()
packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:127
↓ 13 callersMethodtake
* 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 callersFunctionassertShrinkProducesStrictlySmallerValue
( arbitraryBuilder: (extraParameters: U) => Arbitrary<T>, isStrictlySmaller: (vNew: T, vOld: T, extraParam
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryAssertions.ts:186
↓ 12 callersMethodisFailure
(err: unknown)
packages/fast-check/src/check/precondition/PreconditionFailure.ts:16
↓ 12 callersFunctiononeof
( ...args: [...Ts] | [OneOfConstraints, ...Ts] )
packages/fast-check/src/arbitrary/oneof.ts:144
↓ 12 callersMethodschedule
(task: Promise<T>, label?: string, metadata?: TMetaData, customAct?: SchedulerAct)
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:136
↓ 11 callersMethodafterEach
* 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 callersMethodcreate
(value: number)
packages/fast-check/test/unit/check/arbitrary/definition/Arbitrary.itest.spec.ts:106
↓ 11 callersFunctionf
()
packages/fast-check/test/unit/arbitrary/scheduler.spec.ts:41
↓ 11 callersMethodparse
Parse a serialized replayPath
packages/fast-check/src/check/model/ReplayPath.ts:10
↓ 11 callersFunctiontypedIntArrayArbitraryArbitraryBuilder
( constraints: TypedIntArrayBuilderConstraints<TValue>, defaultMin: TValue, defaultMax: TValue, TypedA
packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts:15
↓ 10 callersFunctionf
(...args: TArgs)
packages/fast-check/src/arbitrary/func.ts:27
↓ 10 callersFunctionnat
(arg?: number | NatConstraints)
packages/fast-check/src/arbitrary/nat.ts:54
↓ 10 callersMethodpop
()
packages/fast-check/test/e2e/ModelBased.spec.ts:7
↓ 10 callersFunctionsafeMapGet
(instance: Map<T, U>, key: T)
packages/fast-check/src/utils/globals.ts:359
↓ 9 callersMethodgetNthOrLast
* 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 callersMethodisAsync
* 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 callersMethodscheduleFunction
( asyncFunction: (...args: TArgs) => Promise<T>, customAct?: SchedulerAct, )
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:140
↓ 8 callersFunctionafterEach
(fn: AfterEachHook)
packages/fast-check/src/check/plugin/LifeCyclePlugins.ts:234
↓ 8 callersFunctionsafeMapSet
(instance: Map<T, U>, key: T, value: U)
packages/fast-check/src/utils/globals.ts:353
↓ 8 callersMethodsize
()
packages/fast-check/test/e2e/ModelBased.spec.ts:8
↓ 8 callersFunctionuniqueArray
(arb: Arbitrary<T>, constraints: UniqueArrayConstraints<T, U> = {})
packages/fast-check/src/arbitrary/uniqueArray.ts:216
↓ 8 callersMethodwaitOne
(customAct?: SchedulerAct)
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:236
↓ 7 callersFunctionact
()
packages/fast-check/test/unit/arbitrary/scheduler.spec.ts:62
↓ 7 callersFunctionbuildConfigFor
(pkg, dirname, replacementsFor)
rolldown.common.config.js:8
↓ 7 callersFunctioncloneIfNeeded
(instance: T)
packages/fast-check/src/check/symbols.ts:48
↓ 7 callersFunctiondoubleToIndex
(d: number)
packages/fast-check/src/arbitrary/_internals/helpers/DoubleHelpers.ts:83
↓ 7 callersFunctionfloatToIndex
(f: number)
packages/fast-check/src/arbitrary/_internals/helpers/FloatHelpers.ts:82
↓ 7 callersFunctionmakeLazy
(producer: () => IterableIterator<T>)
packages/fast-check/src/stream/LazyIterableIterator.ts:27
↓ 7 callersFunctionmapToConstant
(...entries: { num: number; build: (idInGroup: number) => T }[])
packages/fast-check/src/arbitrary/mapToConstant.ts:40
↓ 7 callersFunctionoption
( arb: Arbitrary<T>, constraints: OptionConstraints<TNil> = {}, )
packages/fast-check/src/arbitrary/option.ts:60
↓ 7 callersMethodwaitAll
(customAct?: SchedulerAct)
packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts:242
↓ 7 callersFunctionwalkTree
(tree: ShrinkTree<T>, visit: (t: T) => void)
packages/fast-check/test/unit/arbitrary/__test-helpers__/ShrinkTree.ts:48
↓ 6 callersFunctionconstantFrom
(...values: Arrayfy<TArgs>)
packages/fast-check/src/arbitrary/constantFrom.ts:33
↓ 6 callersFunctionexpectThrowWithCause
( promise: Promise<unknown>, errorCause: string | RegExp | Error, )
packages/worker/test/e2e/__test-helpers__/ThrowWithCause.ts:3
↓ 6 callersFunctionfakeArbitraryStaticValue
( value: () => T, context: () => unknown = () => undefined, )
packages/fast-check/test/unit/arbitrary/__test-helpers__/ArbitraryHelpers.ts:42
↓ 6 callersMethodgetData
* 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 callersFunctionleaf
(minValue: number, maxValue: number)
examples/002-recursive/isSearchTree/arbitraries/BinarySearchTreeArbitrary.ts:5
↓ 6 callersFunctionlistTodos
()
examples/005-race/todolist/model-based/Model.ts:23
↓ 6 callersFunctionrelativeSizeToSize
(size: Size | RelativeSize, defaultSize: Size)
packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts:101
↓ 6 callersMethodrunAfterEach
()
packages/fast-check/src/check/property/Property.generic.ts:135
↓ 6 callersMethodrunBeforeEach
()
packages/fast-check/src/check/property/Property.generic.ts:131
↓ 6 callersMethodscheduleSequence
* 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 callersFunctionstream
(g: IterableIterator<T>)
packages/fast-check/src/stream/Stream.ts:248
↓ 6 callersFunctiontree
(minValue: number, maxValue: number)
examples/002-recursive/isSearchTree/arbitraries/BinarySearchTreeArbitrary.ts:25
↓ 6 callersMethodtryAdd
* 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 callersFunctionbigInt
(...args: [] | [bigint, bigint] | [BigIntConstraints])
packages/fast-check/src/arbitrary/bigInt.ts:93
↓ 5 callersFunctionboolean
* For boolean values - `true` or `false` * @remarks Since 0.0.6 * @public
packages/fast-check/src/arbitrary/boolean.ts:21
↓ 5 callersMethodbuild
()
packages/fast-check/test/e2e/Shadows.spec.ts:67
next →1–100 of 1,889, ranked by callers