nghiavt2906 / Web-Scraping-BE

0 stars 0 forks source link

[Chore] Implement unit test for the crawler service #10

Closed olivierobert closed 1 year ago

olivierobert commented 1 year ago

Issue

While there are numerous integration tests in the codebase, a significant missing part is testing for the code feature: scraping.

Expected

Unit or integration tests are implemented to verify that the crawler service performs as expected.

nghiavt2906 commented 1 year ago

I have done adding the unit testing for the crawler. Please have a look: https://github.com/nghiavt2906/Web-Scraping-BE/blob/38d42ee07342f6b357714a526ca973559fe86a8c/src/services/crawler.test.js#L1-L39

olivierobert commented 1 year ago

I have reviewed the update. The implementation (with proper dependency injection) was improved too due to the testing need 💪 I have added one suggestion for your review.