I am looking to test Axios functionality of a method which posts a file using Jest.
As part of this I would like to POST a local mocked JSON file, is that possible?
I can't see any way to require or import a JSON file for uploading in a POST.
// import jsonFileMock from "../__mocks__/jsonFileMock.json";
import jsonFileMock = require("../__mocks__/jsonFileMock.json");
const apiResponse = await someApiUpload(jsonFileMock); // Doesn't work