blob: 6fa6143efc008384ce1cc2612422ec36c87f322c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
var BUGNUMBER = 1317153;
var summary = "await outside of async function should provide better error";
print(BUGNUMBER + ": " + summary);
let caught = false;
try {
eval("await 10");
} catch(e) {
assertEq(e.message.includes("await is only valid in"), true);
caught = true;
}
assertEq(caught, true);
if (typeof reportCompare === "function")
reportCompare(true, true);
|