blob: 3bde4aedff08c47b97c47dee2ff9a0c1fbb39349 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// |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: >
Errors thrown from the async function body reject the returned promise
flags: [async]
---*/
async function foo() {
throw 1;
}
foo().then(function () {
$DONE("Should not be called");
}, function (e) {
assert.sameValue(e, 1);
$DONE();
});
|