isar / isar/hive

Hive v4 Testability

Open
#1,240 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

We are currently using hive (2.2.x) in some unit and (riverpod) provider tests to make sure that we also have our repositories tested to make sure that update or delete operations work as expected.

This worked because hive is using a simple file to store its data. We work around the hive api a little bit to make it work, but its very cool that we are able to do that.
Now with Hive v4 I don't think this is possible anymore becuase Hive is now static and we can't create individual instances during tests. Correct me if I am wrong.

Are we able to run hive v4 in a unit test with isar as a backend?
If yes I would like to contribute to the documentation and explain how testing could/would work.

Have a nice day 👋🏽

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 reviewing Hive v4's test setup and the existing repository and Riverpod provider tests described in the issue. Determine whether isolated unit-test instances can use Isar as a backend; done means documenting a verified testing procedure or clearly documenting that this is not supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.