(cb)
| 20 | var cleanup = [] |
| 21 | |
| 22 | function makeStandardEnv (cb) { |
| 23 | temp.mkdir(function (err, uploadDir) { |
| 24 | if (err) return cb(err) |
| 25 | |
| 26 | cleanup.push(uploadDir) |
| 27 | |
| 28 | var storage = multer.diskStorage({ |
| 29 | destination: uploadDir, |
| 30 | filename: generateFilename |
| 31 | }) |
| 32 | |
| 33 | cb(null, { |
| 34 | upload: multer({ storage: storage }), |
| 35 | uploadDir: uploadDir, |
| 36 | form: new FormData() |
| 37 | }) |
| 38 | }) |
| 39 | } |
| 40 | |
| 41 | after(function () { |
| 42 | while (cleanup.length) rimraf.sync(cleanup.pop()) |
no test coverage detected
searching dependent graphs…