title: How to mock FileList in $("fileupload").files[0]?
body: <p><a href="https://i.stack.imgur.com/NlXJE.png" rel="nofollow noreferrer">1</a>I am not able to make a mock for file upload using J query.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> $('#fileUpload')[0].files[0]=  "mock image data here"
   $ ('#fileUpload').trigger ('change');</code></pre>
  </div>
  </div>
  
  Please ref attachment .<a href="https://i.stack.imgur.com/NPnmH.png" rel="nofollow noreferrer">[Actual FileList object]</a></p>