DAVFoundation / xplore

⛓ A block explorer for local Ethereum testnets
MIT License
62 stars 65 forks source link

Create a test for the transactions reducer #35

Closed griffobeid closed 6 years ago

griffobeid commented 6 years ago

first-timers-only

This issue is tagged :octocat: first-timers-only. It is only for people who have never contributed to open source before and are looking for an easy way take their first steps.

Consider this as your chance to dip your toe into the world of open-source and get some bragging rights for writing code that makes drones fly, cars find charging stations, helps people and goods move from place to place and more...

Find more first-timers-only issues from DAV Foundation here.

Thank you for your help ❤️

What is this project?

DAV (Decentralized Autonomous Vehicles) is a new non-profit foundation working to build an open-source infrastructure for autonomous vehicles (cars, drones, trucks, robots, and all the service providers around them) to communicate and transact with each other over blockchain.

As an organization that believes in building a large community of open-source contributors, we often create issues like this one to help people take their first few steps into the world of open source.

Xplore

The DAV project you are looking at is Xplore. Xplore is a blockchain explorer you can run on your machine to explore local Ethereum nodes on your machine. It is used by developers working with DAV's libraries to ease development and see how the blockchain is affected by their work.

How you can help

The Issue

We are now implementing unit testing using the library jest. The transactions reducer is missing a test. Create a new file transactions.spec.js in the test/specs/reducers directory. Write a new test in that file that makes sure the output of the transactions reducer is correct.

Have a look at this example on how to write jest tests for redux. Also, take a look at some of the tests that have already been written for reference.

Contributing to Xplore

Asking for help

We appreciate your effort in taking the time to work on this issue and help out the open source community and the foundation. If you need any help, feel free to ask below or in our gitter channel. We are always happy to help 😄

sanketsingh24 commented 6 years ago

I would like to work on this issue as my first PR :) Can I ?

griffobeid commented 6 years ago

Of course, @sanketsingh24, have at it!

Sent with GitHawk

sanketsingh24 commented 6 years ago

Please correct me if I am wrong. The payload here should have four fields- hash, from, to and blockNumber.

And I am getting following error when executing npm install -g dav-cli

1553 error Error while executing:
1553 error /usr/bin/git ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
1553 error
1553 error fatal: unable to connect to github.com:
1553 error github.com[0: 192.30.253.113]: errno=Connection timed out
1553 error github.com[1: 192.30.253.112]: errno=Connection timed out
1553 error
1553 error
1553 error exited with error code: 128
1554 verbose exit [ 1, true ]
griffobeid commented 6 years ago

Have you tried running a git clone as well? See if that can complete successfully. I tried uninstalling dav-cli and reinstalling on my machine and it worked fine.

As for your other question, I think you are on the right track but I'm going to ask @TalAter to comment just to be sure.

sanketsingh24 commented 6 years ago

@griffobeid Is there any specific data type or which hash, from, to and blockNumber need to belong? I think it will be better If I get the test values for them.

And for other problem, git clone is running perfectly for dav-cli but giving same error while installing. Maybe a problem with frozeman's repo or something else - Link to issue