Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Many tests without actual assertions #212

Closed
victorb opened this issue Jan 31, 2018 · 0 comments · Fixed by #211
Closed

Many tests without actual assertions #212

victorb opened this issue Jan 31, 2018 · 0 comments · Fixed by #211

Comments

@victorb
Copy link
Contributor

victorb commented Jan 31, 2018

A lot of tests are currently not actually doing any valuable assertions on the responses from calls. Rather, it just makes sure there is no errors and that keys exists.

Example: https://github.com/ipfs/interface-ipfs-core/blob/9d91267ab7ab61e41c84eaa81c647cd630d83797/js/src/stats.js#L39-L59

In this sample, res could have all those keys set to null and the test would pass. We should at least assert the type of the value, but best would be the exact value if we can. If not exact, we should be able to assert the format instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant