node_modules/express-fileupload/test/options.spec.js
/**
   * Upload the file for testing and verify the expected filename.
   * @param {object} options The expressFileUpload options.
   * @param {string} actualFileNameToUpload The name of the file to upload.
   * @param {string} expectedFileNameOnFileSystem The name of the file after upload.
   * @param {function} done The mocha continuation function.
   */
Upload the file for testing and verify the expected filename.
@param {object} options The expressFileUpload options.
@param {string} actualFileNameToUpload The name of the file to upload.
@param {string} expectedFileNameOnFileSystem The name of the file after upload.
@param {function} done The mocha continuation function.
Upload the file for testing and verify the expected filename . @param { object } options The expressFileUpload options . @param { string } actualFileNameToUpload The name of the file to upload . @param { string } expectedFileNameOnFileSystem The name of the file after upload . @param { function } done The mocha continuation function .
function executeFileUploadTestWalk(options,
    actualFileNameToUpload,
    expectedFileNameOnFileSystem,
    done) {
    request(server.setup(options))
      .post('/upload/single')
      .attach('testFile', path.join(fileDir, actualFileNameToUpload))
      .expect(200)
      .end(function(err) {
        if (err) {
          return done(err);
        }
        const uploadedFilePath = path.join(uploadDir, expectedFileNameOnFileSystem);
        fs.stat(uploadedFilePath, done);
      });
  }
function executeFileUploadTestWalk ( options , actualFileNameToUpload , expectedFileNameOnFileSystem , done ) { request ( server . setup ( options ) ) . post ( '/upload/single' ) . attach ( 'testFile' , path . join ( fileDir , actualFileNameToUpload ) ) . expect ( 200 ) . end ( function ( err ) { if ( err ) { return done ( err ) ; } const uploadedFilePath = path . join ( uploadDir , expectedFileNameOnFileSystem ) ; fs . stat ( uploadedFilePath , done ) ; } ) ; }
Upload the file for testing and verify the expected filename.
Upload the file for testing and verify the expected filename .