I\'m unable to mock moment() or moment().format functions. I have states where, currentDateMoment and currentDateFormatted ar
moment()
moment().format
currentDateMoment
currentDateFormatted
mockdate works for me
import mockDate from "mockdate"; test('Should add some', () => { mockDate.set(new Date('2/20/2020')); const action = addSome(); expect(action).toEqual({ createdAt: moment() }); mockDate.reset(); })