liquidmetal-dev / liquidmetal-dev/battery

Add unit tests for internal/store/convert.go

Open Beginner friendly
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority/medium
Dominant language
Go
Stars
1
Forks
0
Avg merge
2h 13m
Merged PRs (30d)
33

Description

Every other package under `internal/` has a matching `_test.go` file. `internal/store/convert.go` has no dedicated test file and is only exercised indirectly via `sqlite_test.go`.

Add direct unit tests for the conversion functions in `convert.go` to cover edge cases (nil/zero values, boundary conditions) that may not be reached through the sqlite integration tests.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading internal/store/convert.go and the existing coverage in sqlite_test.go to identify each conversion function and its current behavior. Add a dedicated convert_test.go covering nil and zero values plus boundary conditions, then run the internal/store Go tests; done means the conversion functions are directly tested without relying on SQLite integration coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sqlite
Domain
database, testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.