「Use .rejects to unwrap the reason of a rejected promise so any other matcher can be chained. If the promise is fulfilled the assertion fails.」「expect(Promise.reject(new Error('octopus'))).rejects.toThrow('octopus',);」
「Use .rejects to unwrap the reason of a rejected promise so any other matcher can be chained. If the promise is fulfilled the assertion fails.」「expect(Promise.reject(new Error('octopus'))).rejects.toThrow('octopus',);」