Skip to content

Improve test coverage with Vitest #71

@Brayden

Description

@Brayden

Is your feature request related to a problem? Please describe.
Currently the test coverage of the project is nearly non-existent. We do have and use Vitest as a dependency in the Starbase project already that future tests should also use. The idea is to begin accumulating test coverage throughout the entire project.

Goal is to bring test coverage up to above 75% with meaningful tests.

Describe the solution you'd like
Important: Tests should not just be made for line coverage, they should also include meaningful tests that help reveal when issues arise. For example, if we were to write a test for our LiteREST code to see if making a request fetched data we would pass it potentially:

  • a real table name
  • a fake table name
  • no table name (omitted altogether)
  • -1 or null as a value

When PR's are made we run the following Github test action (https://github.com/outerbase/starbasedb/blob/main/.github/workflows/test.yaml) that verifies the project can execute a pnpm i and then run tests with pnpm test. All tests added should be executed during that same pnpm test command.

Describe alternatives you've considered
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions