hamjest
Version:
A library of composable matchers for defining meaningful and readable assertions in JavaScript.
18 lines (14 loc) • 318 B
JavaScript
;
const _ = require('lodash');
const Matcher = require('./Matcher');
function truthy() {
return _.create(new Matcher(), {
matches: function (actualValue) {
return !!actualValue;
},
describeTo: function (description) {
description.append('truthy value');
}
});
}
module.exports = truthy;