stat-again
Helper for running tests interacting with the file system: It should happen, but when? So stat again!
Simple usage
When a file or a directory should be there but is not, or shouldn't be there but still is, promises are to be made and resolved. Node module stat-again
factors out some of the cumbersome logic.
Expecting a file or directory to be created
; const pathname = 'dir/file.js';const delayInMs = 30;const numberOfTries = 10; ;
Expecting a file or directory to be deleted
; const pathname = 'dir/file.js';const delayInMs = 30;const numberOfTries = 10; ;
Stating eventually a file or directory
Stats are as returned by fs.stat(path, callback).
; const pathname = 'dir/file.js';const delayInMs = 30;const numberOfTries = 10; ;
Comparing two file last modifications
; const pathname1 = 'dir/file1.js';const pathname2 = 'dir/file2.js'; ;
License
stat-again is MIT licensed.
© 2016 Jason Lenoble