Created
May 15, 2018 14:08
-
-
Save WaldoJeffers/1ae01106b266aaccb55574dc0a5a19fe to your computer and use it in GitHub Desktop.
expectToThrow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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