dimanche 29 mai 2016

How to compare two CSV files in Mocha?

I am trying to write a unit test case for a file download feature in my NodeJS/ExpressJS app, that uses Mocha for testing.

I have no idea how to write the test though. The functionality is to check if a JSON to CSV parser module is working. I have a sample JSON file that I can feed into the module, and a CSV file that I can compare the result with, but I don't know how to compare the result with the fixture file.

TIA

Aucun commentaire:

Enregistrer un commentaire