How to test/simulate file upload from nodeJs unit/integration test?
I would like to test my GraphQL endpoint, for that I created a test client based on `request-promise-native`. This works for all mutations, but not when it has an Upload type. I studied the unit testing code in this library, but could not figure it out.

I want to programatically upload a file and send it with form data. My current solution always has a file value of null on the receiving side.

Preparing the file for formData:
```
const file: any = fs.createReadStream('./a.txt');
const f = Promise.resolve({
      stream: file,
      filename: 'a.txt',
      mimetype: 'application/pdf',
      encoding: '7bit',
    });
```

In my formData (the `query` and `variables` are inserted before, but that is not the problem
```
const formData: any = {
      operations: `{ "query": "${query}", ${variables} }`,
      map: '{ "file0": ["variables.file"] }',
      file0: {
        value: f,
        options: {
          filename: 'a.txt',
          contentType: 'application/txt',
        },
      },
    };
```

Please help!