Skip to content

Instantly share code, notes, and snippets.

@martinheidegger
Last active August 29, 2015 14:05
Show Gist options
  • Save martinheidegger/f5c90111291a10493024 to your computer and use it in GitHub Desktop.
Save martinheidegger/f5c90111291a10493024 to your computer and use it in GitHub Desktop.
Thoughts on quality assurance of joi definitions

Joi is nice but it can also be used unsufficiently. For example: If you want to make sure that didn't forget a restriction on every input it would be nice to lint the joi definition for a quality assurance.

require("joi-qa").sizeRestrictions().wellDocumented().noRegExp().hasExamples().verify({
   ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment