Okay I just fixed my issue by handly writing the relative path to my file.
it("[UPDATE] GIVEN multipart request it should update a book and return it", async done => {
expect.assertions(2);
const books = await find("book", { name: "testbook" });
const book = books[0];
await request(strapi.server)
.put("/books/" + book.id)
.field("data", JSON.stringify({ name: "coucou multipart" }))
.attach("files.logo", "tests/testsUtils/dot.jpg") // Change to write handly picture path
.set("Authorization", "Bearer " + userInfo.jwt)
.set("Content-Type", "multipart/form-data")
.expect(200)
.then((data) => {
expect(data.body.name).toBe("coucou multipart");
expect(data.body.logo.name).toBe("dot.jpg")
});
done();
});