easy_mock_io 0.1.0
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])swapsIOOverrides.globalfor aMemoryFileSystem, so alldart:ioFile/Directoryaccess 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_ASSETSfolder and pre-creates/app_root. - Exports
MemoryFileSystemso callers can pre-seed a filesystem before installing.