You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The Chainbase plugin is expected to require comprehensive test coverage to ensure reliable interaction with the Chainbase API. Without proper testing, issues such as incorrect token balance retrieval, API timeout handling, and error management are likely to surface in production. The plugin should be thoroughly tested to handle various scenarios including successful queries, API failures, and timeout conditions.
Describe the solution you'd like
A comprehensive test suite should be implemented for the plugin-chainbase package using vitest. The test coverage is expected to include:
Token Balance Actions:
Tests should be written to validate proper handling of token balance retrieval
Input validation should be implemented for chain IDs and addresses
Response formatting should be tested for various token decimal places
Query Execution:
Tests should be created to verify SQL query execution
Timeout scenarios should be properly handled with configurable retry attempts
Error cases should be tested including API failures and invalid responses
Mock Implementation:
The Chainbase API responses should be properly mocked
Timer functions should be mocked to test timeout scenarios
Environment variables should be managed within tests
Code Organization:
Tests should be structured similarly to the plugin-bootstrap package
Test files should be organized by feature (actions, libs)
Common test utilities should be shared across test files
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The Chainbase plugin is expected to require comprehensive test coverage to ensure reliable interaction with the Chainbase API. Without proper testing, issues such as incorrect token balance retrieval, API timeout handling, and error management are likely to surface in production. The plugin should be thoroughly tested to handle various scenarios including successful queries, API failures, and timeout conditions.
Describe the solution you'd like
A comprehensive test suite should be implemented for the plugin-chainbase package using vitest. The test coverage is expected to include:
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: