IBM / ipfs-social-proof

IPFS Social Proof: A decentralized identity and social proof system
MIT License
142 stars 27 forks source link

[tests] add a mock gist-api to remote-proofs #43

Closed daviddahl closed 5 years ago

daviddahl commented 5 years ago

This way we can not test the network connectivity live in the test and we will avoid false test failures over weird async behavior.

daviddahl commented 5 years ago

See: https://github.com/IBM/ipfs-social-proof/blob/master/test/remote-proofs.spec.js#L134 and: https://github.com/IBM/ipfs-social-proof/blob/master/src/remote-proofs.js#L19

Inside remote-proofs.js one will need to make the gist-client configurable or just set it manually in the test file

cdeng001 commented 5 years ago

You mentioned moving mocks to their own space. I think there should be a dir for mocks, like this and ipfs node mocks, that can be built upon as we add tests.

daviddahl commented 5 years ago

this is a dupe of #44