Debian Codegraph @

packages/babel-plugin-transform-for-of/test/fixtures/spec-exec/generator-break.js

raw symbols SCIP
1 function* f() {
2 yield 1; yield 2; yield 3;
3 }
4
5 let res = [];
6
7 for (const x of f()) {
8 if (x === 2) break;
9 res.push(x);
10 }
11
12 expect(res).toEqual([1]);