Skip to content

Instantly share code, notes, and snippets.

@WaldoJeffers
Created May 15, 2018 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WaldoJeffers/1ae01106b266aaccb55574dc0a5a19fe to your computer and use it in GitHub Desktop.
Save WaldoJeffers/1ae01106b266aaccb55574dc0a5a19fe to your computer and use it in GitHub Desktop.
expectToThrow
import { identity, map, compose, forEach } from 'ramda'
const withCatchAll = fn => (...args) => fn(...args).catch(identity)
const unsafeInsert = witchCatchAll(insert)
await Promise.all(map(compose(unsafeInsert, stripOneMandatoryParam)), MANDATORY_PARAMS).then(forEach(expectToThrow))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment