mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
15 lines
223 B
JavaScript
15 lines
223 B
JavaScript
function triple (x) {
|
|
return x * 3
|
|
}
|
|
|
|
async function asyncFunction(n) {
|
|
return n
|
|
|> Math.abs(#)
|
|
|> await Promise.resolve(#)
|
|
|> triple(#);
|
|
}
|
|
|
|
asyncFunction(-7).then(result => {
|
|
expect(result).toBe(21);
|
|
});
|