DEV Community

Ashwini Manoj
Ashwini Manoj

Posted on

2

Making my first contribution to an open source project

I feel so elated right now! I came across this project, a benchmark runner for OrbitDB. To be frank, I actually came across this issue when I was looking for a repo I could contribute to, as part of the Hacktoberfest that’s being run by DigitalOcean. This was going to be my first official PR and I felt adding tests would be something I could start with.

It was not as easy as I expected. I added Mocha as the testing framework (I was so used to Jest and Jasmine before this), with SinonJS for mocks/stubs and ChaiJS for better assertion statements. But the main challenge was figuring out how to test cli commands.

yargs is a nodejs library that helps in building command line tools. I had no clue how to go about testing it. I looked around the web and was finally able to figure out how to go about it.

You can see what I have done here:

Add Testing Framework with tests #5

Added Mocha as testing framework and SinonJS for mocks and stubs.

Let me know what you think about this. I would also love to know how you made your first contribution to open source!

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay