hound-search/hound

`make test` fails if `db/` has contents.

Open

#363 opened on Oct 30, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (5,470 stars) (606 forks)batch import
buggood first issuehelp wanted

Description

If you start the houndd server, /db becomes populated with the contents of other repos. Both jest and go test currently crawl over /db and get confused by it, usually because there are naming collisions.

I think three things would make this a little better:

  1. make clean should also empty db/.
  2. jest should ignore db/, which seems easy to do in a jest-config.js file.
  3. go test should ignore db, which seems like we have to do manually, by using something like go test 'go list ./... | grep -v directoriesToSkip\` (I got that example from stack overflow).

A band-aid could be to just do 1 above and then run it before we run tests. That doesn't seem ideal, though, because we'd have to re-install node_modules between make clean and running the tests.

Contributor guide