easy_mock_io 0.1.0 copy "easy_mock_io: ^0.1.0" to clipboard
easy_mock_io: ^0.1.0 copied to clipboard

In-memory dart:io for Flutter tests. MockMemoryIO.init() swaps IOOverrides.global for a MemoryFileSystem, so File and Directory access runs in memory and never touches disk. File locks are no-ops (par [...]

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add easy_mock_io

With Flutter:

 $ flutter pub add easy_mock_io

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  easy_mock_io: ^0.1.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:easy_mock_io/easy_mock_io.dart';
0
likes
140
points
155
downloads

Documentation

API reference

Publisher

verified publisherahmedomar.com.ly

Weekly Downloads

In-memory dart:io for Flutter tests. MockMemoryIO.init() swaps IOOverrides.global for a MemoryFileSystem, so File and Directory access runs in memory and never touches disk. File locks are no-ops (parallel tests can't deadlock on the same file), the UNIT_TEST_ASSETS folder is seeded into the memory filesystem, and /app_root is pre-created.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

file

More

Packages that depend on easy_mock_io