function createFile(name, size, type) {
  const file = new File([], name, { type });
  Object.defineProperty(file, "size", {
    get() {
      return size;
    },
  });
  return file;
}
createFile creates a mock File object
@param {string} name
@param {number} size
@param {string} type