-
-
Save AllGistsEqual/4725f73e737b464ff763e65d54de23f6 to your computer and use it in GitHub Desktop.
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
const mockSuccess = (value: SuccessValue): Promise<SuccessValue> => { | |
return new Promise(resolve => { | |
setTimeout(() => resolve(value), 2000) | |
}) | |
} | |
const mockFailure = (value: FailureValue): Promise<FailureValue> => { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => reject(value), 2000) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment