From 55021376b590fadc5c54a1854cd5fb6a69f0aecc Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 13 Apr 2017 14:38:13 -0400 Subject: [PATCH] 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 --- tests/image-stream/tester.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/image-stream/tester.js b/tests/image-stream/tester.js index 614dd030..e1b0e284 100644 --- a/tests/image-stream/tester.js +++ b/tests/image-stream/tester.js @@ -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