Skip to content

Instantly share code, notes, and snippets.

@samueljoli
Created January 30, 2017 18:25
Show Gist options
  • Select an option

  • Save samueljoli/f437cbed76b3a56754650cd15e6eb687 to your computer and use it in GitHub Desktop.

Select an option

Save samueljoli/f437cbed76b3a56754650cd15e6eb687 to your computer and use it in GitHub Desktop.
const validateResult = require('../src/helper').validateResult;
it('should throw ValidationError when mappedResult === `FOOBAR`', function() {
return Promise
.resolve()
.bind({
mappedResult: 'FOOBAR'
})
.then(validateResult)
.catch(function(error) {
error.should.be.instanceof(ValidationError);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment