Sample Gunner Strategy implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
367 B

const Shotgun = require('shotgun-query');
module.exports = (expectable, expect, docs) => {
6 years ago
const unitExpects = [];
if (expectable.checks) {
unitExpects.push(expect(expectable.checks).isArray());
expectable.checks.forEach(check =>
unitExpects.push(
new Shotgun(check).eval(docs).call(expect))
);
}
6 years ago
return expect.expectMany(unitExpects);
};