@@ -3,10 +3,6 @@ import { parse } from "../lib/index.js";
33
44describe ( "Option `comment_no_infix`" , function ( ) {
55 it ( "validation" , function ( ) {
6- parse ( "" , { comment_no_infix : undefined } , ( ) => { } ) ;
7- parse ( "" , { comment_no_infix : null } , ( ) => { } ) ;
8- parse ( "" , { comment_no_infix : false } , ( ) => { } ) ;
9- parse ( "" , { comment_no_infix : true } , ( ) => { } ) ;
106 ( ( ) => {
117 parse ( "" , { comment_no_infix : "" } , ( ) => { } ) ;
128 } ) . should . throw ( {
@@ -22,52 +18,4 @@ describe("Option `comment_no_infix`", function () {
2218 code : "CSV_INVALID_OPTION_COMMENT" ,
2319 } ) ;
2420 } ) ;
25-
26- it ( "with `true`, field starting with comment" , function ( next ) {
27- parse (
28- "a,#,c" ,
29- {
30- comment : "#" ,
31- comment_no_infix : true ,
32- } ,
33- ( err , records ) => {
34- if ( ! err ) {
35- records . should . eql ( [ [ "a" , "#" , "c" ] ] ) ;
36- }
37- next ( err ) ;
38- } ,
39- ) ;
40- } ) ;
41-
42- it ( "with `true`, field not starting with comment" , function ( next ) {
43- parse (
44- "a,b#,c" ,
45- {
46- comment : "#" ,
47- comment_no_infix : true ,
48- } ,
49- ( err , records ) => {
50- if ( ! err ) {
51- records . should . eql ( [ [ "a" , "b#" , "c" ] ] ) ;
52- }
53- next ( err ) ;
54- } ,
55- ) ;
56- } ) ;
57-
58- it ( "with `false`" , function ( next ) {
59- parse (
60- "a,b#,c" ,
61- {
62- comment : "#" ,
63- comment_no_infix : false ,
64- } ,
65- ( err , records ) => {
66- if ( ! err ) {
67- records . should . eql ( [ [ "a" , "b" ] ] ) ;
68- }
69- next ( err ) ;
70- } ,
71- ) ;
72- } ) ;
7321} ) ;
0 commit comments