hamjest
Version:
A library of composable matchers for defining meaningful and readable assertions in JavaScript.
17 lines (13 loc) • 344 B
JavaScript
;
const _ = require('lodash');
const __ = require('../..');
const TestMatcher = function (matchesFn) {
matchesFn = matchesFn || (() => true);
return _.create(new __.Matcher(), {
matches: matchesFn,
describeTo: function (description) {
description.append('Matcher description');
}
});
};
module.exports = TestMatcher;