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

Improve test coverage with Vitest for LiteREST and QueryLogPlugin #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aybanda
Copy link

@aybanda aybanda commented Jan 24, 2025

Purpose

This pull request aims to improve the test coverage of the StarbaseDB project by implementing tests for the LiteREST and QueryLogPlugin components. This addresses issue #71, which highlights the need for better test coverage to ensure the reliability of the codebase.

Tasks

  • Implemented the fetchData method in the LiteREST class.
  • Created tests for the LiteREST class to validate its functionality.
  • Implemented the logQuery method in the QueryLogPlugin class.
  • Created tests for the QueryLogPlugin to ensure correct logging and error handling.

Verify

  1. Review the implementation of the fetchData method in the LiteREST class located in src/literest/index.ts.
  2. Check the test cases in tests/literest.test.ts to ensure they cover both valid and invalid scenarios.
  3. Review the implementation of the logQuery method in the QueryLogPlugin class located in plugins/query-log/index.ts.
  4. Check the test cases in tests/query-log.test.ts to ensure they validate logging functionality and error handling.
  5. Run the tests using pnpm test to verify that all tests pass successfully.

Before

No previous implementation of fetchData and logQuery methods.

After

Screenshot 2025-01-24 at 11 42 24 PM

/claim #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant