covertable
Version:
Efficient TypeScript library for pairwise testing, generating minimal covering arrays with constraint support.
2 lines (1 loc) • 822 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./controller-tIzPuNQH.cjs"),a=(e,r)=>Math.random()>.5?1:-1;function c(e,r){return e.sort(a)}function*i(e){const r=e.incomplete;for(let t of r.values()){const o=e.getCandidate(t),s=e.storable(o);s===null||s===0||(yield t)}}const l=function*(e,r={}){yield*new n.Controller(e,r).makeAsync()},u=(e,r={})=>{const t=new n.Controller(e,r),o=t.make();if(t.stats.uncoveredPairs.length>0)throw new n.NeverMatch(`Unable to cover ${t.stats.uncoveredPairs.length} remaining pair(s) without violating constraints`,t.stats.uncoveredPairs);return o},d={hash:n.hash,random:c},m={greedy:n.greedy,simple:i};exports.Controller=n.Controller;exports.NeverMatch=n.NeverMatch;exports.criteria=m;exports.make=u;exports.makeAsync=l;exports.sorters=d;