Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class MockPromise {
then(fn) {
this.thenFn = fn
return this
}
catch(fn) {
this.catchFn = fn
return this
}
exec(name, params) {
this[`${name}Fn`](params)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment