Samagra-Development / yaus

Yet Another URL Shortner
https://github.com/Samagra-Development/yaus/wiki
11 stars 28 forks source link

Tests have a dependency over Redis #96

Open yuvrajsab opened 11 months ago

yuvrajsab commented 11 months ago

Describe the bug Our test cases need a Redis module dependency to run, but this should not be the case as test cases should be independent of these types of dependencies. These dependencies should have been mocked.

To Reproduce Steps to reproduce the behavior:

  1. Go to the root folder of the project.
  2. Run the command yarn test api without running Redis.
  3. See the error: image

Expected behavior Test cases should have passed even if Redis is not connected.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

GeekGawd commented 10 months ago

I would like to work on this issue.

yuvrajsab commented 10 months ago

Yes, go for it 🚀 @GeekGawd.