How to test the Error cause with Jest and TypeScript