Skip to content

Commit

Permalink
Add: test for large files
Browse files Browse the repository at this point in the history
commented out or else tests takes very long. And unable to push a file larger than 100mb to Github
  • Loading branch information
lvancraen committed Jun 21, 2019
1 parent 7961e12 commit 37e3a55
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,28 @@ describe('Tests on GTFS', () => {
});
});

// it('Tests on importing/exporting very large file', (done) => {
// You'll need to download a large CSV and place it within the samples/veryLargeFile folder.
// A good one is STM stop_times.txt
// const path = `${__dirname}/samples/veryLargeFile`;
// const gtfs = new Gtfs(path);
//
// const stopTime = gtfs.getStopTimeWithTripIdAndStopSequence('197160641', '1');
// expect(stopTime.stop_id).to.equal('51095');
//
// const outputPath = `${__dirname}/temp_4865ce67d01f96a489fbd0e71adef800b/`;
//
// gtfs.exportAtPath(outputPath, (exportError) => {
// if (exportError) { throw exportError; }
//
// fs.remove(outputPath, (removeError) => {
// if (removeError) { throw removeError; }
//
// done();
// });
// });
// });

it('Tests on the regex/pattern applied to fix a bad CSV', (done) => {
const path = `${__dirname}/samples/2/`;
const gtfsWithoutFix = new Gtfs(path);
Expand Down

0 comments on commit 37e3a55

Please sign in to comment.