Created
December 12, 2016 15:26
-
-
Save raphaelpor/a2510577606c65fbc072795b13e03b65 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 somePromise = () => Promise.resolve('Done!'); | |
test('Promise', t => { | |
return somePromise().then(result => { | |
t.is(result, 'Done!'); | |
}); | |
}); | |
// ou | |
test(async t => { | |
const result = await somePromise(); | |
t.is(result, 'Done!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment