hawkins / watchdog

⚠️ Watch filesystem for changes and then run a command
2 stars 0 forks source link

Tests #2

Open hawkins opened 6 years ago

hawkins commented 6 years ago

I'd like to write some tests, primarily around the arguments interop and the watch function in general

hawkins commented 5 years ago

Testing this honestly seems like a pain, maybe it just my level of rust (in)experience talking, but having to work with a mocked filesystem, Exec, watcher......

I suppose it's feasible if we broke functions up into parts that leverage library code and parts that decided arguments to give to library code, and only tested the latter?

hawkins commented 5 years ago

Yeah, just to get something out of this, I would skip testing actual filesystem events themselves, and instead test the ability to respond to simulated events and prove that we can reliably: