As discussed adding some logic to scores.js to filter out scores below a certain threshold (60 for now)
Updated the test data to reflect this and modified a test so it would pass
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC3142a9c245dc: [e.cash] Filter out low exchange scores
Preview the site and check items on the get-ecash page with low scores are gone
check all test pass - npm run test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- ecash-getscores-modifications
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 25519 Build 50619: Build Diff Build 50618: arc lint + arc unit
Event Timeline
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.104.128:41686 for the next 60 minutes.
Looks good on the preview
web/e.cash/data/__tests__/scores.test.js | ||
---|---|---|
155 ↗ | (On Diff #42865) | Is this change related to the score cutoff change? |
web/e.cash/data/scores.js | ||
154 ↗ | (On Diff #42865) | Maybe it's just me, but the comment seems a bit confusing. I see that's how it's implemented, but the comment doesn't make it obvious that score is the primary sorting, alphabetically only factors in when the other stuff is equal. |
web/e.cash/data/scores.js | ||
---|---|---|
158 ↗ | (On Diff #42865) | There is no test for this sort function. You certainly want to move the threshold to some config file, pass it as a parameter to this sort function and add a unit test to check the behavior. |
Okay added, I couldnt think of a better place to put the scoreThreshold than at the top of scores.js, but open to suggestions
And as far as that other test change in getScoreCardData, I added it here because the sort change was causing that test to fail as it was
The unit test needs to give confidence the code is working, not only testing the happy path (as per telegram discussion)