mapbox / cloudfriend

Helper functions for assembling CloudFormation templates in JavaScript
ISC License
69 stars 9 forks source link

exit 1 for invalid template in bin/validate #6

Closed emilymcafee closed 8 years ago

emilymcafee commented 8 years ago

I want to use cloudfriend's template validator in my package.json like:

"pretest": "validate-template my-template.js"

I've added an exit 1 so that tests fail if this validation fails, otherwise they'll just log the failure and continue on happily.

@rclark what do you think? Is cloudfriend the right spot for this, or is there a better way to achieve this?

rclark commented 8 years ago

:+1: I've been writing dedicated tape tests wrapped around the validation function, but this is great.