code-charity / youtube

[top~1 open YouTube & Video web-extension] Enrich your experience & choice! 🧰100+clever features📌set&forget📌Longest-standing(yet rare&tough alone. Please help/join🧩us👨‍👩‍👧‍👧) ..⋮ {playback|content discovery|player|extra buttons|distractions|related videos|shorts|ads|quality|codec|full tab|full screen}
http://improvedtube.com
Other
3.29k stars 498 forks source link

Add Jest Framework, JSLint, and Testing Workflow #2345

Closed PTheocharis closed 2 weeks ago

PTheocharis commented 2 weeks ago

Description: This pull request focuses on improving testing and code quality.

Changes -New package.json file to add Jest and JSLint

-Added Jest Framework: Implemented Jest using npm. Jest is now configured to run tests located in the "tests" directory.

-Added JSLint as it was suggested as a development dependency.

-Added a GitHub Actions workflow file (js-lint-test.yml) to automate the process of running JSLint and Jest tests. This workflow showcases all the JSLint remarks and the testing results

Added 4 Initial Unit Tests for camelize function and events function (TRIGGER Chapter) in the core.js file. These tests are written using Jest and utilize mocking techniques, because I didn't want to export the extension object and make changes in the core.js

Created a jest.config.js file to improve the process.

Additional Notes: All five tests have been successfully executed, confirming the reliability and effectiveness of the Jest in the core.js file. I tried to keep up good quality standards, I would be happy if yoy help me with any needed improvements as I am still a beginner :)

ImprovedTube commented 2 weeks ago

thank you!

(didnt review yet.)


BTW can we reduce the number of files in the root directory? (cosmetics)

ImprovedTube commented 2 weeks ago

side-effect: "used by: 899 people"-box (not making sense for this project)

PTheocharis commented 2 weeks ago

Hello 👋 Is there any update on the reviewing part?