hive icon indicating copy to clipboard operation
hive copied to clipboard

Hive v4 Testability

Open JulianBissekkou opened this issue 2 years ago • 1 comments

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 👋🏽

JulianBissekkou avatar Sep 07 '23 13:09 JulianBissekkou

+1. We are wondering the exact same thing

frank06 avatar Sep 14 '23 18:09 frank06