fast-check
Version:
Property based testing framework for JavaScript (like QuickCheck)
11 lines (10 loc) • 434 B
JavaScript
import { genericTuple } from '../arbitrary/TupleArbitrary.js';
import { AsyncProperty } from './AsyncProperty.generic.js';
function asyncProperty(...args) {
if (args.length < 2)
throw new Error('asyncProperty expects at least two parameters');
const arbs = args.slice(0, args.length - 1);
const p = args[args.length - 1];
return new AsyncProperty(genericTuple(arbs), t => p(...t));
}
export { asyncProperty };