| 1 |
class Cl { |
| 2 |
static *#foo() { |
| 3 |
yield 2; |
| 4 |
return 3; |
| 5 |
} |
| 6 |
|
| 7 |
test() { |
| 8 |
return Cl.#foo(); |
| 9 |
} |
| 10 |
} |
| 11 |
|
| 12 |
const val = new Cl().test(); |
| 13 |
expect(val.next()).toEqual({ value: 2, done: false }); |
| 14 |
expect(val.next()).toEqual({ value: 3, done: true }); |