SamagraX-Stencil / stencil

NestJS on steroids 💪
https://stencil.samagra.io
MIT License
28 stars 30 forks source link

Feat:Initial implementation of file-upload-tests #89

Closed vsvishalsharma closed 4 months ago

vsvishalsharma commented 6 months ago

fixes #50

Tests included:

  1. Test for Instantiation:
  2. Test for Handling File Upload:
  3. Test for Handling Uploaded File:
  4. Test for Error Handling:
vsvishalsharma commented 6 months ago

@sooraj1002 can you suggest any changes that i need to make

vsvishalsharma commented 5 months ago

@techsavvyash I have written more test cases like handling invalid file format and improved the code readability

Savio629 commented 5 months ago

@vsvishalsharma Can you exclude the unnecessary file from the commit( package-lock and yarn lock)?

vsvishalsharma commented 5 months ago

@Savio629 done

sooraj1002 commented 5 months ago

@vsvishalsharma could you send a video showing the working tests?

vsvishalsharma commented 5 months ago

image @sooraj1002 sorry for the late response i just wanted to double check everything and i have made some changes in the FastifyFileInterceptor to support the test cases better

vsvishalsharma commented 5 months ago

@sooraj1002 kindly ignore jest.unit.json fiel as it is there only for testing purpose

techsavvyash commented 5 months ago

@sooraj1002 kindly ignore jest.unit.json fiel as it is there only for testing purpose

Please remove any and all files that are to be ignored.

techsavvyash commented 5 months ago

image

@sooraj1002

sorry for the late response i just wanted to double check everything and i have made some changes in the FastifyFileInterceptor to support the test cases better

Please make sure to manage and report any bugs that you found by opening an issue ticket and then submit code changes relating to that.

vsvishalsharma commented 5 months ago

image @sooraj1002 sorry for the late response i just wanted to double check everything and i have made some changes in the FastifyFileInterceptor to support the test cases better

Please make sure to manage and report any bugs that you found by opening an issue ticket and then submit code changes relating to that.

image

the issue is that appmodule.ts is not present in the the directory specified"../../../packages/user-service/src/app.module" this is the correct location for it the file_upload tests are working fine

vsvishalsharma commented 5 months ago

image @techsavvyash @sooraj1002 the tests are working fine waiting for your response on the interceptor part shall i change it or not

vsvishalsharma commented 5 months ago

hey @techsavvyash @sooraj1002 looking forward for your review

techsavvyash commented 5 months ago

hey @techsavvyash @sooraj1002 looking forward for your review

have added a few comments please resolve them and we can close this PR out.

vsvishalsharma commented 5 months ago

@techsavvyash sir revereted back the interceptor