UNPKG

hamjest

Version:

A library of composable matchers for defining meaningful and readable assertions in JavaScript.

18 lines (14 loc) 330 B
'use strict'; const _create = require('lodash/create'); 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;