Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
delimiter: simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Nov 2, 2018
1 parent d0cd0c3 commit 712b107
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/options.comment.coffee
Expand Up @@ -3,7 +3,7 @@ parse = require '../src'

describe 'options comment', ->

it 'skip line starting by # by default', (next) ->
it 'skip line starting by single comment char', (next) ->
parse """
# skip this
"ABC","45"
Expand Down
10 changes: 5 additions & 5 deletions test/options.delimiter.coffee
Expand Up @@ -18,13 +18,13 @@ describe 'options delimiter', ->

it 'using tab', (next) ->
parse """
20322051544\t\t8.8017226E7\t45\t
\t1974\t8.8392926E7\t\t
abc\t\tde\tf\t
\thij\tklm\t\t
""", delimiter: '\t', (err, data) ->
return next err if err
data.should.eql [
[ '20322051544','','8.8017226E7','45','']
[ '','1974','8.8392926E7','','']
[ 'abc','','de','f','']
[ '','hij','klm','','']
]
next()

Expand Down Expand Up @@ -60,6 +60,6 @@ describe 'options delimiter', ->
a,b,c
a,b,c
""", delimiter: ':', rowDelimiter: '\t\t', max_limit_on_data_read: 10, (err, data) ->
err.message.should.eql 'Field exceeds max_limit_on_data_read setting (10) ":"' if err
err.message.should.eql 'Field exceeds max_limit_on_data_read: maximum value is 10' if err
should(data).not.be.ok()
next()

0 comments on commit 712b107

Please sign in to comment.