tests(image-stream): ensure imageStream.getFromFilePath() returns a path (#1280)

This would have prevented https://github.com/resin-io/etcher/pull/1278
from happening.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2017-04-13 14:38:13 -04:00 committed by GitHub
parent 3f7ec8a148
commit 55021376b5

View File

@ -59,6 +59,8 @@ exports.extractFromFilePath = function(file, image) {
const output = tmp.tmpNameSync();
return imageStream.getFromFilePath(file).then(function(results) {
m.chai.expect(results.path).to.equal(file);
if (!_.some([
results.size.original === fs.statSync(file).size,
results.size.original === fs.statSync(image).size