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

Expand test coverage #44

Merged
merged 4 commits into from
Feb 14, 2024
Merged

Expand test coverage #44

merged 4 commits into from
Feb 14, 2024

Conversation

mrfelton
Copy link
Member

@mrfelton mrfelton commented Feb 14, 2024

This pull request includes changes to improve the fee calculation in the src/util.ts file and updates to the GitHub workflows. The most crucial changes are the addition of a feeMinimum parameter to several functions to calculate the minimum fee, renaming of the .github/workflows/dev.yml to .github/workflows/main.yml, and ignoring the master branch in the .github/workflows/test.yml file. The tests in test/unit.test.ts have also been updated to reflect the changes made in src/util.ts.

GitHub Workflows:

Fee Calculation:

  • src/util.ts: The getEstimates() function was updated to calculate the feeMinimum and log it. The extractMempoolFees() function was modified to take an additional depth parameter. The calculateFees() function was updated to take an additional feeMinimum parameter and use it in the filterEstimates() function. [1] [2] [3] [4] [5]

Tests:

  • test/unit.test.ts: The tests were updated to import additional functions from src/util.ts and test data was defined. New tests were added for the filterEstimates(), extractMempoolFees(), and calculateFees() functions. The addFeeEstimates() test was updated to use the new test data.

@mrfelton mrfelton self-assigned this Feb 14, 2024
@mrfelton mrfelton added scope:tests Indicates improvements or additions to tests type:enhancement Indicates new feature requests labels Feb 14, 2024
@mrfelton mrfelton merged commit 72b61dd into master Feb 14, 2024
1 check passed
@mrfelton mrfelton deleted the tests branch February 14, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:tests Indicates improvements or additions to tests type:enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant