Basically had an async function in JavaScript (nodejs app) that returned a list...unfortunately I forgot to call await on this testFunction(x, y)
and so it broke some code in production. Is there a linting rule that would catch this? Is there a test I can write to ensure that this won't break because I forgot to call await (it seems like linting is the way to ensure errors like this are caught)?
const testFunction = async (x, y) => {
let z = await someFunction();
//..some code that returns a list after processing z
}