Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
18
node_modules/fast-check/lib/esm/arbitrary/scheduler.js
generated
vendored
Normal file
18
node_modules/fast-check/lib/esm/arbitrary/scheduler.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { buildSchedulerFor } from './_internals/helpers/BuildSchedulerFor.js';
|
||||
import { SchedulerArbitrary } from './_internals/SchedulerArbitrary.js';
|
||||
export function scheduler(constraints) {
|
||||
const { act = (f) => f() } = constraints || {};
|
||||
return new SchedulerArbitrary(act);
|
||||
}
|
||||
function schedulerFor(customOrderingOrConstraints, constraintsOrUndefined) {
|
||||
const { act = (f) => f() } = Array.isArray(customOrderingOrConstraints)
|
||||
? constraintsOrUndefined || {}
|
||||
: customOrderingOrConstraints || {};
|
||||
if (Array.isArray(customOrderingOrConstraints)) {
|
||||
return buildSchedulerFor(act, customOrderingOrConstraints);
|
||||
}
|
||||
return function (_strs, ...ordering) {
|
||||
return buildSchedulerFor(act, ordering);
|
||||
};
|
||||
}
|
||||
export { schedulerFor };
|
||||
Loading…
Add table
Add a link
Reference in a new issue