campus-errand/miniapp/node_modules/fast-check/lib/arbitrary/commands.js
2026-03-01 05:01:47 +08:00

10 lines
712 B
JavaScript

import { CommandsArbitrary } from './_internals/CommandsArbitrary.js';
import { maxGeneratedLengthFromSizeForArbitrary, MaxLengthUpperBound, } from './_internals/helpers/MaxLengthFromMinLength.js';
/**@__NO_SIDE_EFFECTS__*/function commands(commandArbs, constraints = {}) {
const { size, maxCommands = MaxLengthUpperBound, disableReplayLog = false, replayPath = null } = constraints;
const specifiedMaxCommands = constraints.maxCommands !== undefined;
const maxGeneratedCommands = maxGeneratedLengthFromSizeForArbitrary(size, 0, maxCommands, specifiedMaxCommands);
return new CommandsArbitrary(commandArbs, maxGeneratedCommands, maxCommands, replayPath, disableReplayLog);
}
export { commands };