UNPKG

pactum

Version:

REST API Testing Tool for all levels in a Test Pyramid

21 lines (17 loc) 453 B
const { utils } = require('pactum-matchers'); function getMatchingRules(data, path, rules) { const _rules = rules || {}; utils.setMatchingRules(_rules, data, path); return _rules; } function getRawValue(data) { return utils.getValue(data); } function validate(actual, expected, rules, path, strict) { return utils.compare(actual, expected, rules, path, strict).message; } module.exports = { getMatchingRules, getRawValue, validate };