schaermu/node-fluent-ffmpeg — pull request #227 by njoyard (2014-04-09 20:12:57+00:00)
Title: Improve test reliability

Okay, I think I've solved most test reliability issues here (haven't I said that before already ?...)

I did the following changes to processor tests:
* Enable tests to declare files/directories they create, and add an afterEach hook to test for those files existence and delete them. Any missing file/dir makes the test fail.
* Ensure all tests use unique output filenames, do declarations as stated above and don't remove their files themselves.
* Add a common helper to create FfmpegCommands so that the afterEach hook can ensure the command has finished before allowing the next test to run. Any remaining ffmpeg process at the end of a test makes the test fail.
* Fix all tests that failed due to the above checks (mainly ensuring the command is actually done before calling the done() callback)

(other tests have not changed as they seem reliable enough; though we can apply the same changes to other tests if necessary)

I also added more input file checks on startup and added a comment block to explain how those above should be used. Tests have run successfully 4 times in a row at a very travis-crowded time (had to wait nearly half an hour for the tests to even start...).