camicroscope / caMicroscope

Digital pathology image viewer with support for human/machine generated annotations and markups.
BSD 3-Clause "New" or "Revised" License
255 stars 295 forks source link

Jest test for DrawerHelper JS #954

Closed gbengaoluwadahunsi closed 6 months ago

gbengaoluwadahunsi commented 7 months ago

Summary I wrote test functions in the test file for the drawLine and drawCircle methods of the caDrawHelper JS file. These tests verify that the methods correctly call the appropriate canvas methods to draw lines and circles, respectively.

Motivation The purpose of writing these test functions is to ensure the correctness and robustness of the caDrawHelper class. By having comprehensive test coverage, we can confidently make changes to the codebase, knowing that existing functionality remains intact.

Testing The test functions have been carefully crafted to cover various scenarios and edge cases for drawing lines and circles. They validate the behavior of the methods and provide assurance that they perform as expected.

helper