Skip to content

Commit 0e95022

Browse files
committed
chore(babel-plugin-espower): adjust with ArrowFunctionExpression output format change
1 parent 4fe36d1 commit 0e95022

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

test/fixtures/ArrowFunctionExpression/expected.js

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

3-
assert(function (v) {
4-
return v + 1;
5-
});
3+
assert(v => v + 1);
64

7-
assert(function (v, i) {
8-
return v + i;
9-
});
5+
assert((v, i) => v + i);
106

11-
assert(function (v) {
12-
return { even: v, odd: v + 1 };
13-
});
7+
assert(v => ({ even: v, odd: v + 1 }));
148

15-
assert(assert._expr(assert._capt(assert._capt(seven, 'arguments/0/left') === assert._capt((function (v, i) {
16-
return v + i;
17-
})(assert._capt(four, 'arguments/0/right/arguments/0'), assert._capt(five, 'arguments/0/right/arguments/1')), 'arguments/0/right'), 'arguments/0'), {
9+
assert(assert._expr(assert._capt(assert._capt(seven, 'arguments/0/left') === assert._capt(((v, i) => v + i)(assert._capt(four, 'arguments/0/right/arguments/0'), assert._capt(five, 'arguments/0/right/arguments/1')), 'arguments/0/right'), 'arguments/0'), {
1810
content: 'assert(seven === ((v, i) => v + i)(four, five))',
1911
filepath: 'test/fixtures/ArrowFunctionExpression/fixture.js',
2012
line: 9

0 commit comments

Comments
 (0)