covidatlas / li

Next-generation serverless crawler for COVID-19 data
Apache License 2.0
57 stars 33 forks source link

Make `npm test` work on a fresh clone #587

Closed joliss closed 3 years ago

joliss commented 3 years ago

These commits allow us to run

git clone https://github.com/covidatlas/li
cd li
npm install
npm test

and have the test suite run successfully, as is customary for Node packages.

I've also amended the instructions to use this workflow; they're a bunch shorter now as a result. I believe most people tend to have origin as the upstream remote, and some other name (joliss for me) for their forks. This is what I've been doing, and all Node packages I've encountered so far have been amenable to this workflow.

joliss commented 3 years ago

Wait. Renaming tests/integration/shared/sources/gitdiff.json.example to tests/integration/shared/sources/gitdiff.json is going to be a nuisance for you, @jzohrab, since you're not using "origin/master", so it would always show as modified in your clone. I'll have to come up with a better way to do this. Let me get back to you.

Okay, it now simply uses origin/master as a default when there's no gitdiff.json file. This should be better.

joliss commented 3 years ago

The tests for this PR are red only because of #588, but other than that the test suite passes. So this PR is ready for review now!

jzohrab commented 3 years ago

Odd that the tests failed ... they had been working, I added those checks b/c the old code wasn't double-checking those cases.

jzohrab commented 3 years ago

Thanks @joliss!