66} from '../fixtures/data' ;
77import {
88 optionsHeaderSeperatorSemicolon ,
9- optionsOnlyHeader ,
10- optionsOnlySeperatorTab ,
9+ optionsHeaderSeparatorDefault ,
10+ optionsHeaderDefaultSeperatorTab ,
11+ optionsDefault ,
1112} from '../fixtures/options' ;
1213
1314import {
@@ -18,38 +19,38 @@ import {
1819 expectedResultArrayOnlySeparatorTab ,
1920} from '../fixtures/expected-results' ;
2021
21- test ( 'convertArrayOfArraysToCSV | array of arrays | with no options' , ( ) => {
22- const result = convertArrayOfArraysToCSV ( dataArrayWithHeader ) ;
22+ test ( 'convertArrayOfArraysToCSV | array of arrays | with default options' , ( ) => {
23+ const result = convertArrayOfArraysToCSV ( dataArrayWithHeader , optionsDefault ) ;
2324
2425 expect ( result ) . toBe ( expectedResultArrayWithHeaderNoOptions ) ;
2526} ) ;
2627
27- test ( 'convertArrayOfArraysToCSV | array of arrays | with no options and no header' , ( ) => {
28- const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader ) ;
28+ test ( 'convertArrayOfArraysToCSV | array of arrays | with default options and no header' , ( ) => {
29+ const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader , optionsDefault ) ;
2930
3031 expect ( result ) . toBe ( expectedResultArrayNoHeaderNoOptions ) ;
3132} ) ;
3233
33- test ( 'convertArrayOfArraysToCSV | array of arrays | with no options and no header' , ( ) => {
34- const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader ) ;
34+ test ( 'convertArrayOfArraysToCSV | array of arrays | with default options and no header' , ( ) => {
35+ const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader , optionsDefault ) ;
3536
3637 expect ( result ) . toBe ( expectedResultArrayNoHeaderNoOptions ) ;
3738} ) ;
3839
39- test ( 'convertArrayOfArraysToCSV | array of arrays | options: header + seperator semicolon' , ( ) => {
40+ test ( 'convertArrayOfArraysToCSV | array of arrays | options: header + separator semicolon' , ( ) => {
4041 const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader , optionsHeaderSeperatorSemicolon ) ;
4142
4243 expect ( result ) . toBe ( expectedResultArrayHeaderSeparatorSemicolon ) ;
4344} ) ;
4445
45- test ( 'convertArrayOfArraysToCSV | array of arrays | options: header ' , ( ) => {
46- const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader , optionsOnlyHeader ) ;
46+ test ( 'convertArrayOfArraysToCSV | array of arrays | options: header + default separator ' , ( ) => {
47+ const result = convertArrayOfArraysToCSV ( dataArrayWithoutHeader , optionsHeaderSeparatorDefault ) ;
4748
4849 expect ( result ) . toBe ( expectedResultArrayOnlyHeader ) ;
4950} ) ;
5051
51- test ( 'convertArrayOfArraysToCSV | array of arrays | options: separator tab ' , ( ) => {
52- const result = convertArrayOfArraysToCSV ( dataArrayWithHeader , optionsOnlySeperatorTab ) ;
52+ test ( 'convertArrayOfArraysToCSV | array of arrays | options: default header + separator tab' , ( ) => {
53+ const result = convertArrayOfArraysToCSV ( dataArrayWithHeader , optionsHeaderDefaultSeperatorTab ) ;
5354
5455 expect ( result ) . toBe ( expectedResultArrayOnlySeparatorTab ) ;
5556} ) ;
0 commit comments