fix: remove unused e2e test

This commit is contained in:
Chathula
2025-04-04 13:18:18 +02:00
parent 5243fca1dc
commit 0b07780323
2 changed files with 0 additions and 36 deletions

View File

@@ -43,20 +43,6 @@ describe('E2E FileTest', () => {
});
});
it('should allow for file uploads that pass validation without using magic numbers validation', async () => {
return request(app.getHttpServer())
.post('/file/pass-validation-skip-magic-numbers-validation')
.attach('file', './package.json')
.field('name', 'test')
.expect(201)
.expect({
body: {
name: 'test',
},
file: readFileSync('./package.json').toString(),
});
});
it('should throw for file uploads that do not pass validation', async () => {
return request(app.getHttpServer())
.post('/file/fail-validation')

View File

@@ -54,28 +54,6 @@ export class AppController {
};
}
@UseInterceptors(FileInterceptor('file'))
@Post('file/pass-validation-skip-magic-numbers-validation')
uploadFileAndPassValidationWithoutMagicNumbersValidation(
@Body() body: SampleDto,
@UploadedFile(
new ParseFilePipeBuilder()
.addFileTypeValidator({
fileType: 'json',
skipMagicNumbersValidation: true,
})
.build({
fileIsRequired: false,
}),
)
file?: Express.Multer.File,
) {
return {
body,
file: file?.buffer.toString(),
};
}
@UseInterceptors(FileInterceptor('file'))
@Post('file/fail-validation')
uploadFileAndFailValidation(