From bf00d79a39ba447919807081bf20690940fc778d Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 21 Oct 2018 17:57:51 +0100 Subject: [PATCH] Insert a trailing newline when appending new snapshot entries I reckon this fixes a regression introduced in https://github.com/avajs/ava/pull/1852. --- lib/snapshot-manager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/snapshot-manager.js b/lib/snapshot-manager.js index 9a3a184ab..69eed2120 100644 --- a/lib/snapshot-manager.js +++ b/lib/snapshot-manager.js @@ -151,6 +151,8 @@ function appendReportEntries(existingReport, entries) { buffers.unshift(prepend); byteLength += prepend.byteLength; + buffers.push(REPORT_TRAILING_NEWLINE); + byteLength += REPORT_TRAILING_NEWLINE.byteLength; return Buffer.concat(buffers, byteLength); }