How do you feel about making jest/valid-expect rule fixable for cases where await is missing ?
So adding await in front of expect in such cases:
it('should', async () => {
expect(someAsyncThing).rejects.toBe(whatever)
})
//or
it('should', async () => {
expect(someAsyncThing).resolves.toBe(whatever)
})
Fixed code then would look like
it('should', async () => {
await expect(someAsyncThing).rejects.toBe(whatever)
})
//or
it('should', async () => {
await expect(someAsyncThing).resolves.toBe(whatever)
})
I'm happy to give it a try if there is a chance it will be merged :)