I have already written a post about mocking moment.js for tests. Today let’s talk about how to use mocks in a specific tests framework - Jest. Jest was developed by Facebook and was based on another tests library called Jasmine. It meant that Jest used widely popular test syntax and could be adapted very easily.