DEV Community

Rachit Chawla
Rachit Chawla

Posted on

Hacktoberfest : Bonus PR-5

In the final stretch of Hacktoberfest, I aimed for an extra challenge, something beyond my initial goal of four pull requests. Little did I know that this pursuit would lead to a surprising bonus contribution, PR 5.

The Quest for the Fifth Pull Request:

With the Hacktoberfest deadline looming, I persisted in raising issues and pull requests across various projects. My aim was to contribute significantly and make my mark before the event concluded. After numerous attempts, I received an unexpected notification – my fifth pull request had been accepted.

The Challenge: Setting Up Jest and Crafting Test Cases:

My task involved diving into the realm of testing. I had to set up Jest, a powerful testing framework, and write test cases for a script packed with intricate functions. These functions ranged from listing directories/files to extracting titles from HTML. It was not just about ensuring the functions worked; it was about understanding their behavior thoroughly.

The Triumph: Successful Testing and Validation:

Setting up Jest proved to be a meticulous task. I carefully configured it to integrate seamlessly with the project. Once Jest was in place, I crafted detailed test cases for each function. These tests were not merely lines of code; they were validations of the script's functionality. Witnessing the green checkmarks, indicating successful tests, brought a sense of accomplishment.

Conclusion: A Lesson in Testing and Persistence:

PR 5 was more than a bonus contribution; it was a lesson in testing, persistence, and the unexpected rewards of dedication. It reinforced the importance of thorough testing in software development. As Hacktoberfest concluded, I celebrated this unexpected victory, knowing that my open-source journey had grown richer, one test case at a time.

Link to the PR : https://github.com/AhsanAyaz/slides/issues/14

Top comments (0)