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 [...]

0.1.0 #

  • Initial release.
  • MockMemoryIO.init([MemoryFileSystem? fs]) swaps IOOverrides.global for a MemoryFileSystem, so all dart:io File / Directory access runs in memory and never touches disk.
  • File locks (lock / unlock, sync and async) are no-ops, so tests opening the same file in parallel can't deadlock.
  • Seeds the memory filesystem from the UNIT_TEST_ASSETS folder and pre-creates /app_root.
  • Exports MemoryFileSystem so callers can pre-seed a filesystem before installing.
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