Skip to content

Commit

Permalink
Revert "Update tests"
Browse files Browse the repository at this point in the history
This reverts commit 59c3d05.
  • Loading branch information
Léo Frachet committed Mar 29, 2018
1 parent 59c3d05 commit d11e3f3
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,31 @@ describe('Tests on GTFS', () => {
gtfs.exportAtPath(outputPath, (exportError) => {
if (exportError) { throw exportError; }

const routesTxt = fs.readFileSync(`${outputPath}routes.txt`);

expect(String(routesTxt)).to.equal(
'route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,' +
'route_text_color,route_sort_order,some_extra_route_field\n' +
'route_0,agency_0,R0,Route 0,Some new description,3,,,,,some_extra_route_value\n'
);

fs.removeSync(outputPath);

done();
fs.readFile(`${outputPath}routes.txt`, (readRoutesError, routesTxt) => {
if (readRoutesError) { throw readRoutesError; }

expect(String(routesTxt)).to.equal(
'route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,' +
'route_text_color,route_sort_order,some_extra_route_field\n' +
'route_0,agency_0,R0,Route 0,Some new description,3,,,,,some_extra_route_value\n'
);

fs.readFile(`${outputPath}feed_info.txt`, (readFeedInfoError, feedInfoTxt) => {
if (readFeedInfoError) { throw readFeedInfoError; }

expect(String(feedInfoTxt)).to.equal(
'feed_publisher_name,feed_publisher_url,feed_lang,feed_start_date,feed_end_date,feed_version,' +
'some_extra_field\n' +
'Publisher Name,http://google.com,fr,20000101,21001231,42,some_extra_value\n'
);

fs.remove(outputPath, (removeError) => {
if (removeError) { throw removeError; }

done();
});
});
});
});
});

Expand Down

0 comments on commit d11e3f3

Please sign in to comment.