dhruvpatidar359 / nextdraw

A WhiteBoard application used for prototyping supports Websockets
https://nextdraw.vercel.app
MIT License
46 stars 29 forks source link

Write test cases for all the functioanlity present in the app #29

Open dhruvpatidar359 opened 5 months ago

dhruvpatidar359 commented 5 months ago

Is your feature request related to a problem? Please describe. Currently there is no test cases written or test suite to automatically check the exsisting code can handles all situation or not.

Describe the solution you'd like We should write test cases for all the functionality

Describe alternatives you've considered We can move forward by creating different issues under this particular issue.

Additional context Jest and React Testing Library are supposed to be used in writing test cases .

VanshikaSabharwal commented 5 months ago

Would you like to have husky in your project for code check. I have done it before .So, i can do it in 1 day. Please assign me this issue @dhruvpatidar359 .We can use Jest as a pre-commit with husky. This will help all other developers as well to find issues and format code properly.

dhruvpatidar359 commented 5 months ago

Would you like to have husky in your project for code check. I have done it before .So, i can do it in 1 day. Please assign me this issue @dhruvpatidar359 .We can use Jest as a pre-commit with husky. This will help all other developers as well to find issues and format code properly.

i loved that , go ahead . One thing to remember to break your progress in form of sub issues , so that other can also track it . Link those issues to this main issue .

VanshikaSabharwal commented 5 months ago

Okay

VanshikaSabharwal commented 5 months ago

Hey @dhruvpatidar359 , i have added husky and also added pre commit which will run before every commit, the flow will be;-

  1. check jest standards
  2. check prettier standards
  3. check ESLint standards.

Screenshot 2024-05-12 124219

dhruvpatidar359 commented 5 months ago

LGTM

dhruvpatidar359 commented 5 months ago

mark this as a subissue to this issue

VanshikaSabharwal commented 5 months ago

mark this as a subissue to this issue

Is it okay?

VanshikaSabharwal commented 5 months ago

@dhruvpatidar359 Do you have anything else in your mind as a sub issue for this issue?

VanshikaSabharwal commented 5 months ago

If not then let's start discussion on writting tests for the project . As husky is added to the project , on every commit there will be a test run.

@dhruvpatidar359 So, Can you please tell me which kind of tests you want me to write for the project.

dhruvpatidar359 commented 5 months ago

Test Cases includes the test for every component present in the code . We have to increase the test coverage of this code base . You may study about the test coverage over the internet . For example there is a component called as tool bar , then there will be test cases for checking that the change of tools on the press of (number buttons) works well .After any change in code .This will ensure that everything works fine . .... so on

VanshikaSabharwal commented 5 months ago

Got it @dhruvpatidar359

VanshikaSabharwal commented 5 months ago

Hey @dhruvpatidar359 , I have successfully written the tests for store.js file in app folder. I am making a new sub issue and will reference this issue as main issue. Then i will raise PR . So, that you can check and merge it in the project.