uport-project/uport-registry

How to run tests?

haadcode opened this issue · 5 comments

I'm not getting far with uport-persona package and digging into the code, trying to run the tests for uport-registry they all just timeout.

I'm running an ipfs node and testrpc and trying to run the tests with npm run test.

What gives? What do I need to run to have the test pass? Geth? Which parameters?

Pardon my ignorance re. Ethereum ecosystem and tools, I have no idea what I need to setup to up and running.

oed commented

You can use something called testrpc that simulates the ethereum blockchain. To install it you run npm i -g ethereumjs-testrpc then run testrpc in the terminal. Note that each time you start the testrpc you will get a clean slate, ie. everything you've registerd before will be gone.

This should be put in the readme.

Hey @haadcode! Sorry about the troubles! We use the Truffle development environment to compile contracts etc and it has recently been updated to a new version which requires some migration.

Got it all working now! It was indeed a matter of running ethereumjs-testrpc instead of the python testrpc.

PR incoming.

Ok, so I refactored the tests a little so that the needed daemons are run "stand-alone", ie. one doesn't have to install/run anything and rather everything comes with the module on npm install.

See here #8

Thanks for the PR @haadcode!