mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
25 lines
300 B
JavaScript
25 lines
300 B
JavaScript
function* gen() {
|
|
try {
|
|
return;
|
|
} finally {
|
|
// noop
|
|
}
|
|
}
|
|
|
|
expect(gen().next()).toEqual({
|
|
done: true,
|
|
value: undefined
|
|
});
|
|
|
|
async function foobar() {
|
|
try {
|
|
return;
|
|
} finally {
|
|
// noop
|
|
}
|
|
}
|
|
|
|
return foobar().then(function (result) {
|
|
expect(result).toBe(undefined);
|
|
});
|