OpenHausIO / backend

HTTP API for the OpenHaus SmartHome/IoT solution
https://docs.open-haus.io
6 stars 2 forks source link

Add `npm run test` to husky hook "pre-commit"/"pre-push"? #467

Closed mStirner closed 5 months ago

mStirner commented 6 months ago

Linting is fast enough to run in before every commit. Running the tests takes about ~8s.

Run the npm run test command before a push instead?

pre-push

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

docker run -d -p 80:80 kennethreitz/httpbin httpbin
npm run test
docker rm httpbin