hive_test 1.0.1 copy "hive_test: ^1.0.1" to clipboard
hive_test: ^1.0.1 copied to clipboard

Initialize a temporary Hive database for testing

hive_test #

Initialize a temporary Hive database for testing

style: very good analysis Gitmoji Pub Version GitHub GitHub Workflow Status Coverage Status

🚀 Installation #

Install from pub.dev:

dev_dependencides:
  hive_test: ^1.0.1

🔨 Usage #

In your test's setUp method, simply run:

setUp(() async {
  await setUpTestHive();
});

Then, in the tearDown method:

tearDown(() async {
  await tearDownTestHive();
});

Under the hood, this is a real instance of Hive. So you can open boxes, perform read/write transactions etc just as you would in an app!

👨🏻‍💻 Authors #

11
likes
140
pub points
89%
popularity

Publisher

unverified uploader

Initialize a temporary Hive database for testing

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, hive, path

More

Packages that depend on hive_test