In case, sombody else is having the same problem with vite, here is the solutiuon:
vi.mock('react-chartjs-2', () => ({ Doughnut: () => null }));