| 1 |
var _ref2, _ref2$; |
| 2 |
let x = 23; |
| 3 |
expect(x).toEqual(23); |
| 4 |
const y = 24, |
| 5 |
z = 42; |
| 6 |
expect(y).toEqual(24); |
| 7 |
expect(z).toEqual(42); |
| 8 |
function* foo() { |
| 9 |
yield 1; |
| 10 |
yield 2; |
| 11 |
} |
| 12 |
let bar = foo(); |
| 13 |
const _ref = [, bar.next().value], |
| 14 |
_ref$ = _ref[0], |
| 15 |
a = _ref$ === void 0 ? bar.next().value : _ref$, |
| 16 |
b = _ref[1]; |
| 17 |
expect(a).toEqual(2); |
| 18 |
expect(b).toEqual(1); |
| 19 |
const arr = (_ref2 = [,], _ref2$ = _ref2[0], c = _ref2$ === void 0 ? 42 : _ref2$, _ref2); |
| 20 |
expect(c).toEqual(42); |
| 21 |
expect(arr).toStrictEqual([,]); |
| 22 |
var iterCount = 0; |
| 23 |
for (const x = 23; iterCount < 1;) { |
| 24 |
expect(x).toEqual(23); |
| 25 |
// another statement |
| 26 |
|
| 27 |
iterCount += 1; |
| 28 |
} |
| 29 |
expect(iterCount).toEqual(1); |
| 30 |
const d = [void 0]; |
| 31 |
const e = [void 0][0]; |
| 32 |
expect(d).toStrictEqual([,]); |
| 33 |
expect(e).toEqual(undefined); |
| 34 |
const f = void 0; |
| 35 |
expect(f).toEqual(undefined); |
| 36 |
let g = void 0; |
| 37 |
expect(g).toEqual(undefined); |
| 38 |
let thrown; |
| 39 |
try { |
| 40 |
thrown = false; |
| 41 |
babelHelpers.objectDestructuringEmpty(); |
| 42 |
} catch (e) { |
| 43 |
thrown = true; |
| 44 |
} |
| 45 |
expect(thrown).toEqual(true); |
| 46 |
try { |
| 47 |
thrown = false; |
| 48 |
var _ = babelHelpers.slicedToArray(void 0, 0); |
| 49 |
} catch (e) { |
| 50 |
thrown = true; |
| 51 |
} |
| 52 |
expect(thrown).toEqual(true); |