#How to correctly mock an async function in Bun tests?

1 messages · Page 1 of 1 (latest)

cloud copper
#

res.status is a function?

rigid mulch
#

sure, because you do res.status(200)

strange crescent
#

I am slightly confused why mock(readJWTToken) ?
for me make more sense if it is:
mock(() => ({ payload: { id: 1 }})) ?