public-transport / hafas-client

JavaScript client for HAFAS public transport APIs.
ISC License
269 stars 54 forks source link

Add routingModes option to db profile #295

Closed lamBOOO closed 1 year ago

lamBOOO commented 1 year ago

Sorry for the delay, but I started working on #287. It seems to work so far.

I'm a little confused with the testing, so I "only" added an e2e to test all different routingMode options for errors.

Is the testing done properly?

derhuerst commented 1 year ago

Thanks!

I have squashed your commits into one, and adapted that one commit slightly:

lamBOOO commented 1 year ago

Thank you. 👍

Just for understanding: The integration test fixture is generated by "simply" running the test-integration:record script and then pushing the updated recording.har into the repo? 🤔

derhuerst commented 1 year ago

The integration test fixture is generated by "simply" running the test-integration:record script and then pushing the updated recording.har into the repo? 🤔

Yes, although – as you have pointed out – running test-integration:record will fail in practice because most test suites/files' T_MOCK are in the past, so querying new HTTP responses from HAFAS won't work.

I have documented some of the gotchas of the testing setup in 19cdde06. If you have more questions (or even want to contribute more guidance), don't hesitate to create a new Issue!

lamBOOO commented 1 year ago

Thanks, it's now more clear to me. My initial starting point for testing/contribution was the contributing.md.

great work btw 👍