Skip to content

Commit

Permalink
Add test for postImportTableFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
Léo Frachet committed Mar 9, 2018
1 parent b1cfbd4 commit 6ca3161
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/gtfs_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,16 @@ describe('Tests on GTFS constructor options', () => {

done();
});

it('Test on postImportTableFunction', (done) => {
const path = `${__dirname}/samples/1/`;
const postImportTableFunction = (item) => { item.temp = 'some value'; };
const gtfs = new Gtfs(path, { postImportTableFunction });

const route = gtfs.getRouteWithId('route_0')

expect(route.temp).to.equal('some value');

done();
});
});

0 comments on commit 6ca3161

Please sign in to comment.