TimDaub / simple-caldav

caldav in JavaScript; made easy.
20 stars 3 forks source link

Test scripts apparently assume global ava install #15

Open tonimelisma opened 3 years ago

tonimelisma commented 3 years ago

Cloning the repo and running the tests doesn't work:

simple-caldav$ npm run test

> simple-caldav@0.5.0 test
> ava -v

sh: 1: ava: not found
npm ERR! code 127
npm ERR! path /home/toni/Development/simple-caldav
npm ERR! command failed
npm ERR! command sh -c ava -v

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/toni/.npm/_logs/2020-11-29T15_24_55_539Z-debug.log
simple-caldav$ 

Locally installing ava doesn't link any binaries into node-modules/.bin. I suspect the test script assumes a global ava install. Perhaps the test scripts could be changed to use the local ava installation? Is a PR welcome?

TimDaub commented 3 years ago

Hey @tonimelisma, thanks for reaching out.

Interesting that global ava installation is required. I usually do npm init ava and I was assumpt that it puts ava in devDepwndencies.

PRs are welcome and adding ava as a local dependency is a good idea IMO.

TimDaub commented 3 years ago

Actually, I may have misunderstood your comment last time. ava is in devDependencies but what you're saying is that a local install of ava doesn't link any binaries.

Perhaps the test scripts could be changed to use the local ava installation?

How can this be done? PRs are welcome. I'm happy to do it myself too. A resource describing a solution would be helpful e.g. ava docs. Thanks