Skip to content

Instantly share code, notes, and snippets.

@raphaelpor
Created December 12, 2016 15:26
Show Gist options
  • Save raphaelpor/a2510577606c65fbc072795b13e03b65 to your computer and use it in GitHub Desktop.
Save raphaelpor/a2510577606c65fbc072795b13e03b65 to your computer and use it in GitHub Desktop.
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