1278 Views
Recently whilst writing some unit tests in Jest, I had to test some code that took ISO date strings and converted them to formatted date strings, then code that converts them back to ISO strings before it's sent to the server. My first attempt was to use jest.mock and mock each individual method.
0 comments