@@ -7,7 +7,7 @@ const csvPath = path.join(__dirname, '/fixtures/');
7
7
const readCSV = ( { filePath, mapping, defaultLabels} ) => parse ( filePath , mapping , defaultLabels ) ;
8
8
9
9
describe ( 'parse' , function ( ) {
10
- it ( 'read csv: empty file' , async function ( ) {
10
+ it ( 'empty file' , async function ( ) {
11
11
const result = await readCSV ( {
12
12
filePath : csvPath + 'empty.csv'
13
13
} ) ;
@@ -16,7 +16,7 @@ describe('parse', function () {
16
16
result . length . should . eql ( 0 ) ;
17
17
} ) ;
18
18
19
- it ( 'read csv: one column' , async function ( ) {
19
+ it ( 'one column' , async function ( ) {
20
20
const result = await readCSV ( {
21
21
filePath : csvPath + 'single-column-with-header.csv'
22
22
} ) ;
@@ -27,7 +27,7 @@ describe('parse', function () {
27
27
result [ 1 ] . email . should . eql ( '[email protected] ' ) ;
28
28
} ) ;
29
29
30
- it ( 'read csv: two columns, 1 filter' , async function ( ) {
30
+ it ( 'two columns, 1 filter' , async function ( ) {
31
31
const result = await readCSV ( {
32
32
filePath : csvPath + 'two-columns-with-header.csv'
33
33
} ) ;
@@ -38,7 +38,7 @@ describe('parse', function () {
38
38
result [ 1 ] . email . should . eql ( '[email protected] ' ) ;
39
39
} ) ;
40
40
41
- it ( 'read csv: two columns, 2 filters' , async function ( ) {
41
+ it ( 'two columns, 2 filters' , async function ( ) {
42
42
const result = await readCSV ( {
43
43
filePath : csvPath + 'two-columns-obscure-header.csv' ,
44
44
mapping : {
@@ -54,7 +54,7 @@ describe('parse', function () {
54
54
result [ 1 ] . id . should . eql ( '2' ) ;
55
55
} ) ;
56
56
57
- it ( 'read csv: two columns with mapping' , async function ( ) {
57
+ it ( 'two columns with mapping' , async function ( ) {
58
58
const result = await readCSV ( {
59
59
filePath : csvPath + 'two-columns-mapping-header.csv' ,
60
60
mapping : {
@@ -74,7 +74,7 @@ describe('parse', function () {
74
74
result [ 1 ] . id . should . eql ( '2' ) ;
75
75
} ) ;
76
76
77
- it ( 'read csv: two columns with partial mapping' , async function ( ) {
77
+ it ( 'two columns with partial mapping' , async function ( ) {
78
78
const result = await readCSV ( {
79
79
filePath : csvPath + 'two-columns-mapping-header.csv' ,
80
80
mapping : {
@@ -93,7 +93,7 @@ describe('parse', function () {
93
93
result [ 1 ] . id . should . eql ( '2' ) ;
94
94
} ) ;
95
95
96
- it ( 'read csv: two columns with empty mapping' , async function ( ) {
96
+ it ( 'two columns with empty mapping' , async function ( ) {
97
97
const result = await readCSV ( {
98
98
filePath : csvPath + 'two-columns-mapping-header.csv' ,
99
99
mapping : { }
@@ -110,7 +110,7 @@ describe('parse', function () {
110
110
result [ 1 ] . id . should . eql ( '2' ) ;
111
111
} ) ;
112
112
113
- it ( 'read csv: transforms empty values to nulls' , async function ( ) {
113
+ it ( 'transforms empty values to nulls' , async function ( ) {
114
114
const result = await readCSV ( {
115
115
filePath : csvPath + 'multiple-records-with-empty-values.csv'
116
116
} ) ;
@@ -124,7 +124,7 @@ describe('parse', function () {
124
124
should . equal ( result [ 1 ] . name , null ) ;
125
125
} ) ;
126
126
127
- it ( 'read csv: transforms "subscribed_to_emails" column to "subscribed" property when the mapping is passed in' , async function ( ) {
127
+ it ( ' transforms "subscribed_to_emails" column to "subscribed" property when the mapping is passed in' , async function ( ) {
128
128
const mapping = {
129
129
subscribed_to_emails : 'subscribed'
130
130
} ;
@@ -142,7 +142,7 @@ describe('parse', function () {
142
142
assert . equal ( result [ 1 ] . subscribed , false ) ;
143
143
} ) ;
144
144
145
- it ( 'read csv: DOES NOT transforms "subscribed_to_emails" column to "subscribed" property when the WITHOUT mapping' , async function ( ) {
145
+ it ( 'DOES NOT transforms "subscribed_to_emails" column to "subscribed" property when the WITHOUT mapping' , async function ( ) {
146
146
const result = await readCSV ( {
147
147
filePath : csvPath + 'subscribed-to-emails-header.csv'
148
148
} ) ;
0 commit comments