diff --git a/test/coreSpec.js b/test/coreSpec.js index bfa1b39..046406c 100644 --- a/test/coreSpec.js +++ b/test/coreSpec.js @@ -152,7 +152,7 @@ describe(`core::arrays2csv`, () => { it(`renders CSV headers whenever it was given `, () => { const headers = [`X`, `Y`]; const firstLineOfCSV = arrays2csv(fixtures, headers).split(`\n`)[0]; - expect(firstLineOfCSV).toEqual("X","Y"); + expect(firstLineOfCSV).toEqual(`"X","Y"`); }); }); @@ -181,7 +181,7 @@ describe(`core::jsons2csv`, () => { let fixtures =[{X:'12', Y:'bb'}, {Y:'ee', X:'55'}] const headers = ['Y', 'X', 'Z']; const actual = jsons2csv(fixtures, headers); - expect(actual.startsWith("Y","X","Z")).toBeTruthy(); + expect(actual.startsWith(`"Y","X","Z"`)).toBeTruthy(); expect(actual.endsWith(`"ee","55",""`)).toBeTruthy(); }); @@ -199,7 +199,7 @@ describe(`core::string2csv`, () =>{ it(`prepends headers at the top of input`, () => { const headers =[`X`, `Y`]; - expect(string2csv(fixtures, headers)).toEqual(`"X","Y"\n${fixtures}`); + expect(string2csv(fixtures, headers)).toEqual(`X,Y\n${fixtures}`); }); });