kangarang / tcr-ui

A client-side shell to interact with token-curated registries
MIT License
68 stars 28 forks source link

Fix failing tests #111

Closed skmgoldin closed 5 years ago

skmgoldin commented 5 years ago

Some tests that relied on the fromTokenBase function in src/libs/units.js were assuming an incorrect behavior. The tests assumed that this function would always return a full-precision decimal representation of the token amount, but in fact fromTokenBase will always return a decimal encoding with three decimals.

5bbcd62 explicitly updates the test script to function in a headless environment (though this isn't actually necessary, things were working just fine without this). 0ab0e1a defines a minimum yarn version to use. af49178 documents the behavior of fromTokenBase b76de92 updates the assumptions in the tests to match the defined behavior of the fromTokenBase function.

kangarang commented 5 years ago

LGTM