Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test balances.js #370

Closed
mike-burrage-hedera opened this issue Nov 11, 2019 · 1 comment
Closed

Unit test balances.js #370

mike-burrage-hedera opened this issue Nov 11, 2019 · 1 comment
Labels
enhancement Type: New feature P3 rest Area: REST API technical debt test Test infrastructure, automated tests required, etc wontfix This will not be worked on

Comments

@mike-burrage-hedera
Copy link
Contributor

Problem
There are no unit tests, only full end-to-end integration tests for /api/v1/balances (balances.js).

Solution

  • refactor to add methods processDbQueryResponse (translating SQL results to REST API results) and reqToSql (translating incoming REST query to SQL statement)
  • add unit tests (testing ONLY the method in question, not the entire system) for:
    • reqToSql
    • processDbQueryResponse
    • getBalances

Alternatives

Additional Context
See parts of branch rest-api-cleanup, associated with #31

@mike-burrage-hedera mike-burrage-hedera added enhancement Type: New feature technical debt P3 test Test infrastructure, automated tests required, etc rest Area: REST API labels Nov 11, 2019
@steven-sheehy
Copy link
Member

No longer applies

@steven-sheehy steven-sheehy added the wontfix This will not be worked on label Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature P3 rest Area: REST API technical debt test Test infrastructure, automated tests required, etc wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants