mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
11 lines
228 B
JavaScript
11 lines
228 B
JavaScript
var _ref, _;
|
|
function then(fn) {
|
|
return async value => {
|
|
return fn(await value);
|
|
};
|
|
}
|
|
var result = (_ref = (_ = 1, (async x => (await x) + 1)(_)), then(x => x + 1)(_ref));
|
|
result.then(val => {
|
|
expect(val).toBe(3);
|
|
});
|