UNPKG

jest-rdf

Version:
18 lines 774 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { toBeRdfDatasetMatching(dataset, { subject, predicate, object, graph }, matches = 1) { const times = matches === 1 ? 'once' : `${matches} times`; if (dataset.match(subject, predicate, object, graph).size !== matches) { return { message: () => `expected dataset to match ${JSON.stringify({ subject, predicate, object, graph })} ${times}`, pass: false, }; } return { message: () => `expected dataset to not match ${JSON.stringify({ subject, predicate, object, graph })} ${times}`, pass: true, }; }, }; //# sourceMappingURL=toBeRdfDatasetMatching.js.map