mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
12 lines
177 B
JavaScript
12 lines
177 B
JavaScript
function* foobar() {
|
|
try {
|
|
yield 1;
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
const gen = foobar();
|
|
expect(gen.next().value).toBe(1);
|
|
expect(gen.next().value).toBe(undefined);
|