Skip to content

Commit

Permalink
Updated make test, the readme, and the contribution guide
Browse files Browse the repository at this point in the history
  • Loading branch information
shilal committed Apr 15, 2020
1 parent 085f22b commit 4bba2d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Once you're ready, open a [pull request](https://github.com/hound-search/hound/c
your changes (you can read more about pull requests on GitHub [here](http://help.github.com/pull-requests/)).

When you send a pull request, please be sure to include:
- unit tests that validate that your changes work as expected
- unit tests that validate that your changes work as expected (both for Go and for JavaScript changes)
- consice code comments (it can help to imagine that you're explaining your code to a total stranger)
- an examples, if necessary.

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dev: ALL

test:
go test github.com/hound-search/hound/...
npm test

clean:
rm -rf .build node_modules
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,21 @@ GOPATH=$(pwd) make -C src/github.com/hound-search/hound
### Testing

There are an increasing number of tests in each of the packages in Hound. Please make sure these pass before uploading your Pull Request. You can run the tests with the following command.
To run the entire test suite, use:

```
make test
```

If you want to just run the JavaScript test suite, use:
```
npm test
```

Any Go files taht end in `_test.go` are assumed to be test files. Tests should live next to the files they cover. [Check out Go's testing docs](https://golang.org/pkg/testing/) for more details.
Any JavaScript file that ends in `.test.js` is automatically run by Jest, our test runner. Tests should live next to the files that they cover. [Check out Jest's docs](https://jestjs.io/docs/en/getting-started) for more details on writing Jest tests.


### Working on the web UI

Hound includes a web UI that is composed of several files (html, css, javascript, etc.). To make sure hound works seamlessly with the standard Go tools, these resources are all bundled inside of the `houndd` binary. Note that changes to the UI will result in local changes to the `ui/bindata.go` file. You must include these changes in your Pull Request.
Expand Down

0 comments on commit 4bba2d3

Please sign in to comment.