MongoDB and Mongoose - What is the done() function and where does it come from?

From what I could understand, done() is used by the tests in some way and is just intended to simulate what one may do to handle the result of a Mongoose operation. But I couldn’t identify where it comes from or what exactly it does. I’d appreciate it if anyone could confirm my thoughts and/or satisfy my curiosity.