2015-01-04 19:40:09 +11:00

14 lines
158 B
JavaScript

// Options: --async-functions
// Async.
async function rethrow(x) {
1;
throw x;
2;
}
rethrow(2).catch((err) => {
assert.equal(err, 2)
done();
});