// For those who also run into this issue - found a way to solve it.
// Add this line on the top of your file (before test suite definition)
jest.mock('jwt-decode', () => jest.fn());
// And the mock the value inside tests f.e. like this:
(jwtDecode as jest.Mock).mockImplementationOnce(() => ({ exp: 12345 }));