Mocking classes, functions, and React components and hooks in tests

How do you guys mock stuff in tests? I am using mocha to run the tests.