I have mention below method in my controller.What parameter I should add in my test file and pass to cover it?
@UseInterceptors(
FileInterceptor('file', {
storage: diskStorage({
destination: './uploads',
filename: (req, file, cb) => {
if (file) {
const randomName = Array(32)
.fill(null)
.map(() => Math.round(Math.random() * 16).toString(16))
.join('');
cb(null, `${randomName}${extname(file.originalname)}`);
}
}
})
})
)
How i can cover these lines of code in test nestjs using jest. In whole controller only these line of code missing in coverage area.