Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/__test__/rfc2.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,17 @@
"yyy",
"xxx"
]
],
"csv2": [
"aaa",
"zzz"
],
"json2": [
[
"aaa"
],
[
"zzz"
]
]
}
9 changes: 9 additions & 0 deletions test/parse.rfc.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down