JohnnyEstilles/must-sinon

View on GitHub
plugin/assert-prop.js

Summary

Maintainability
A
0 mins
Test Coverage
/*eslint strict:0*/

var errorOnAlways = require('./error-on-always');

function assertProp(target, name, message) {
  target.prototype[name] = function method() {
    errorOnAlways(target, this, name, method);
    this.assert(this.actual[name], message, {expected: true});
  };
}

module.exports = assertProp;