Files
Jan JonesandGitHub 24ac865e9e Revert "Improve output when wrapping functions" (#15979)
* Add a test

* Revert "Improve output when wrapping functions (e.g. `async` functions) (#15922)"

This reverts commit f64c854415.

* Update snapshot
2023-09-16 18:09:27 +02:00

15 lines
269 B
JavaScript

return (async function () {
let items = [1, 2, 3, 4];
let output = [];
for (const item of items) {
await f(async (x) => {
output.push(item);
});
}
expect(output).toStrictEqual([1, 2, 3, 4]);
})();
async function f(lambda) {
await lambda();
}