#jest

Mock require with Jest

I needed to mock a call to require that was used to parse a JSON file and return the data. The require was only called if a value wasn't provided as a parameter and it needed to load a default from …