Skip to content

Commit b5f0927

Browse files
committed
test(babel-plugin-espower): adjust expected output with latest babel
1 parent a3ea77b commit b5f0927

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

test/fixtures/AwaitExpression/expected-presets-stage-3.js

+25-23
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,33 @@
33
var myAsync = (function () {
44
var ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(a) {
55
return regeneratorRuntime.wrap(function _callee$(_context) {
6-
while (1) switch (_context.prev = _context.next) {
7-
case 0:
8-
_context.t0 = assert;
9-
_context.t1 = assert;
10-
_context.t2 = assert;
11-
_context.next = 5;
12-
return a;
6+
while (1) {
7+
switch (_context.prev = _context.next) {
8+
case 0:
9+
_context.t0 = assert;
10+
_context.t1 = assert;
11+
_context.t2 = assert;
12+
_context.next = 5;
13+
return a;
1314

14-
case 5:
15-
_context.t3 = _context.sent;
16-
_context.t4 = _context.t2._capt.call(_context.t2, _context.t3, 'arguments/0/left');
17-
_context.t5 = _context.t4 === 3;
18-
_context.t6 = _context.t1._capt.call(_context.t1, _context.t5, 'arguments/0');
19-
_context.t7 = {
20-
content: 'assert(await a === 3)',
21-
filepath: 'test/fixtures/AwaitExpression/fixture.js',
22-
line: 4,
23-
async: true
24-
};
25-
_context.t8 = _context.t0._expr.call(_context.t0, _context.t6, _context.t7);
26-
assert(_context.t8);
15+
case 5:
16+
_context.t3 = _context.sent;
17+
_context.t4 = _context.t2._capt.call(_context.t2, _context.t3, 'arguments/0/left');
18+
_context.t5 = _context.t4 === 3;
19+
_context.t6 = _context.t1._capt.call(_context.t1, _context.t5, 'arguments/0');
20+
_context.t7 = {
21+
content: 'assert(await a === 3)',
22+
filepath: 'test/fixtures/AwaitExpression/fixture.js',
23+
line: 4,
24+
async: true
25+
};
26+
_context.t8 = _context.t0._expr.call(_context.t0, _context.t6, _context.t7);
27+
assert(_context.t8);
2728

28-
case 12:
29-
case 'end':
30-
return _context.stop();
29+
case 12:
30+
case 'end':
31+
return _context.stop();
32+
}
3133
}
3234
}, _callee, this);
3335
}));

test/fixtures/SpreadElement/expected-presets-es2015.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
3+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
44

55
assert(assert._expr(assert._capt(hello.apply(undefined, _toConsumableArray(assert._capt(names, 'arguments/0/arguments/0/argument'))), 'arguments/0'), {
66
content: 'assert(hello(...names))',

0 commit comments

Comments
 (0)