Skip to content

Commit

Permalink
No Header Row test
Browse files Browse the repository at this point in the history
  • Loading branch information
sundeepnarang committed Apr 25, 2017
1 parent d0b062b commit 900efcb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/no-header.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
jsoncsv = require '../index'
should = require 'should'

describe 'No Header Row', ->
it 'should not contain a header', (done) ->
items = [
{ k: 'foo' }
{ k: 'bar' }
]
jsoncsv.csvBuffered items, {
ignoreHeader: true
fields: [ { name: 'k' } ] # Label not needed
}, (err, csv) ->
csv.should.equal 'foo\r\nbar\r\n'
done()

0 comments on commit 900efcb

Please sign in to comment.