alvarorichard / GoAnime

A CLI tool to browse, play, and download anime in pt-br (Portuguese)
MIT License
123 stars 8 forks source link

Created a Sample Test Package to Start With Something #45

Closed kevinmarquesp closed 6 months ago

kevinmarquesp commented 6 months ago

So, I wasn't able to test most of the code because the internal is mostly composed by private functions, and I don't want to refactor the code that much just to test some functionalities.

The other reason was that the Anime Fire related functions depends on a URL value instead of a page document, witch makes a little hard to test because I don't know if it's OK if the site's front end changes and break some tests, it can be useful to know when to refactor the scrapper code, but I'm not quite sure.

But I think it's a good starting point! Like, now the next feature will have a place to be tested, and the project's CI will incentive developers to open PRs covered with test for the new features/bug fixes.

deepsource-io[bot] commented 6 months ago

Here's the code health analysis summary for commits 5e18b5e..db291bd. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Go LogoGo✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.