UNPKG

must

Version:

Testing and assertion library with friendly BDD syntax — awesome.must.be.true(). Many expressive matchers and is test runner and framework agnostic. Follows RFC 2119 with its use of MUST. Good and well tested stuff.

14 lines (11 loc) 357 B
var Thenable = require("./thenable") module.exports = function(must) { return Thenable(must, promisify) } function promisify(fn) { return function matcher() { var must = Object.create(this) if (Error.captureStackTrace) Error.captureStackTrace(must, matcher) return this.actual.then(Thenable.prototype.then.bind(must, fn, arguments)) } }