index.js
function validation() {
  const target = this._obj;
  this.assert(_.isObject(target), '#{this} is not a Joi validation because it must be an object');
  this.assert(!_.isEmpty(target), '#{this} is not a Joi validation because it is an empty object');
  const fields = _.keys(target);
  const allFieldsPresent = _.every(FIELDS_TO_VALIDATE.map(field => _.includes(fields, field)));

  this.assert(
    allFieldsPresent,
    `${this} is not a validation because it does not contain expected keys`
  );
}
function validation() {
  const target = this._obj;
  this.assert(_.isObject(target), '#{this} is not a Joi validation because it must be an object');
  this.assert(!_.isEmpty(target), '#{this} is not a Joi validation because it is an empty object');
  const fields = _.keys(target);
  const allFieldsPresent = _.every(FIELDS_TO_VALIDATE.map(field => _.includes(fields, field)));

  this.assert(
    allFieldsPresent,
    `${this} is not a validation because it does not contain expected keys`
  );
}
function validation ( ) { const target = this . _obj ; this . assert ( _ . isObject ( target ) , '#{this} is not a Joi validation because it must be an object' ) ; this . assert ( ! _ . isEmpty ( target ) , '#{this} is not a Joi validation because it is an empty object' ) ; const fields = _ . keys ( target ) ; const allFieldsPresent = _ . every ( FIELDS_TO_VALIDATE . map ( field => _ . includes ( fields , field ) ) ) ; this . assert ( allFieldsPresent , ` ${ this } ` ) ; }
Assert that target is a Joi validation
@example
expect(target).to.[not].be.a.validation
target.should.[not].be.a.validation
Assert that target is a Joi validation