// flaky - makes assertion before async task finishes
it('returns correct value', () => {
const value = fetchData();
expect(value).toEqual(5);
});
// better - assert after promise resolves
it('returns correct value', async () => {
const value = await fetchData();
expect(value).toEqual(5);
});