Commit f04930c4 by Alan Plum

Don't leave stray file if test fails.

As assert aborts the code execution if the file exists, this test will result in the file not being deleted if it exists. This change makes sure the file is cleaned up if it exists, before the assert has a chance to abort.
parent fe1699f6
...@@ -186,8 +186,8 @@ describe('cli', function() { ...@@ -186,8 +186,8 @@ describe('cli', function() {
emitter.on('error', done); emitter.on('error', done);
emitter.on('done', function() { emitter.on('done', function() {
fs.exists(sampleCssOutputPath, function(exists) { fs.exists(sampleCssOutputPath, function(exists) {
assert(!exists);
if (exists) {fs.unlinkSync(sampleCssOutputPath);} if (exists) {fs.unlinkSync(sampleCssOutputPath);}
assert(!exists);
done(); done();
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment