summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/async-function/declaration-returns-promise.js
blob: 5cbd29e2a9c1fe49abe4e75be6ff216f8aaa2a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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: >
  Async functions return promises
---*/

async function foo() { };
var p = foo();
assert(p instanceof Promise, "async functions return promise instances");

reportCompare(0, 0);