summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/async-function/evaluation-body-that-returns.js
blob: 6d57a3b973deaea8d33670b5da1946db167de7b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// |reftest| async
// Copyright 2016 Microsoft, Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: >
  The return value of the async function resolves the promise
flags: [async]
---*/

async function foo() {
  return 42;
}

foo().then(function (v) {
  assert.sameValue(v, 42);
  $DONE();
}, $DONE);