13 lines
232 B
JavaScript
13 lines
232 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);
|
|
});
|