diff --git a/test/__test__/rfc2.json b/test/__test__/rfc2.json index ae3ca67..582be21 100755 --- a/test/__test__/rfc2.json +++ b/test/__test__/rfc2.json @@ -17,5 +17,17 @@ "yyy", "xxx" ] + ], + "csv2": [ + "aaa", + "zzz" + ], + "json2": [ + [ + "aaa" + ], + [ + "zzz" + ] ] } diff --git a/test/parse.rfc.spec.js b/test/parse.rfc.spec.js index 842284b..4177fc2 100644 --- a/test/parse.rfc.spec.js +++ b/test/parse.rfc.spec.js @@ -28,6 +28,15 @@ test('RFC Rule #2 - Trailing newline at the end of the file omitted', (t) => { t.end() }) +test('RFC Rule #2 (single column) - Trailing newline at the end of the file omitted', (t) => { + const expect = rfc2.json2 + const actual = parse(rfc2.csv2.join('\n')) + + t.deepEqual(actual, expect) + + t.end() +}) + test('RFC Rule #3 - First row contains header data', (t) => { const expect = rfc3.json const actual = parse(rfc3.csv.join('\n'))