From 72f1506bab4b859bbe58c78893d12928db098583 Mon Sep 17 00:00:00 2001 From: jaymeans Date: Mon, 13 Aug 2018 23:41:38 -0700 Subject: [PATCH] adding support for skipEmptyLines = true to unparse --- tests/test-cases.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test-cases.js b/tests/test-cases.js index 84da9fc..76ee56d 100644 --- a/tests/test-cases.js +++ b/tests/test-cases.js @@ -1638,11 +1638,17 @@ var UNPARSE_TESTS = [ expected: 'date,not a date\r\n2018-05-04T21:08:03.269Z,16\r\n2018-05-08T15:20:22.000Z,32' }, { - description: "Returns empty rows when no content is passed and skipEmptyLines is true", + description: "Returns empty rows when no content is passed and skipEmptyLines is false", input: [[null, ' '], [], ['1', '2']], - config: {skipEmptyLines: true}, + config: {skipEmptyLines: false}, expected: '," "\r\n\r\n1,2' }, + { + description: "Returns without empty rows and skipEmptyLines is true", + input: [[null, ' '], [], ['1', '2']], + config: {skipEmptyLines: false}, + expected: '," "\r\n1,2' + }, { description: "Returns without rows with no content when skipEmptyLines is 'greedy'", input: [[null, ' '], [], ['1', '2']],