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

Commit

Permalink
cast: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Apr 20, 2018
1 parent 2bba7e7 commit 7a29fc2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/es5/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = [

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
// # CSV Parser

// This module provides a CSV parser tested and used against large datasets. Over
Expand Down
2 changes: 1 addition & 1 deletion lib/es5/sync.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
// # CSV Parse Sync

// Provides a synchronous alternative to the CSV parser.
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/sync.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/options.auto_parse.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ describe 'options "auto_parse" (deprecated)', ->
""",
auto_parse: (value, context) ->
if context.index is 0
then new Date "#{value} 05:00:00"
then "#{value}T05:00:00.000Z"
else {...context}
, (err, records) ->
records.should.eql [
[ new Date('2000-01-01T04:00:00.000Z'), {quoting: false, count: 0, index: 1, column: 1} ]
[ new Date('2050-11-27T04:00:00.000Z'), {quoting: false, count: 1, index: 1, column: 1} ]
[ '2000-01-01T05:00:00.000Z', {quoting: false, count: 0, index: 1, column: 1} ]
[ '2050-11-27T05:00:00.000Z', {quoting: false, count: 1, index: 1, column: 1} ]
] unless err
next err

Expand Down
6 changes: 3 additions & 3 deletions test/options.cast.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ describe 'options "cast"', ->
""",
cast: (value, context) ->
if context.index is 0
then new Date "#{value} 05:00:00"
then "#{value}T05:00:00.000Z"
else {...context}
, (err, records) ->
records.should.eql [
[ new Date('2000-01-01T04:00:00.000Z'), {quoting: false, count: 0, index: 1, column: 1} ]
[ new Date('2050-11-27T04:00:00.000Z'), {quoting: false, count: 1, index: 1, column: 1} ]
[ '2000-01-01T05:00:00.000Z', {quoting: false, count: 0, index: 1, column: 1} ]
[ '2050-11-27T05:00:00.000Z', {quoting: false, count: 1, index: 1, column: 1} ]
] unless err
next err

Expand Down

0 comments on commit 7a29fc2

Please sign in to comment.