async-await.js 254 B

1234567891011121314
  1. import test from '../..';
  2. test('async function', async t => {
  3. t.plan(1);
  4. const value = await Promise.resolve(1);
  5. t.is(value, 1);
  6. });
  7. test('arrow async function', async t => {
  8. t.plan(1);
  9. const value = await Promise.resolve(1);
  10. t.is(value, 1);
  11. });