Skip to content

Commit

Permalink
adding in docs folder (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevkevinpal authored Dec 26, 2023
1 parent 0170cc7 commit 42b8154
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ADMINS

### For Contributions

Read the contribution doc [here](./Contribution.md)
Read the contribution doc [here](./docs/Contribution.md)

### Stakwork Youtube vidoes download for tribes feed

Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions docs/Testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# Testing on sphinx-tribes

There are two main tests that we run in this project
- Golang/ our backend tests
- Jest unit and component tests/ frontend test

We have git actions for both of these which can be found in `./.github/workflows/prjob_tests.yml`

# Golang/ our backend tests
#### Run the tests
Run this command you may need to install `cover` first run
- `go get golang.org/x/tools/cmd/cover`

To run the tests run
- `go test ./... -tags mock -race -v`
#### Run with coverage
- `go test ./... -tags mock -race -v -coverprofile=coverage.out && ./cover-check.sh coverage.out <min coverage amount>`
#### Other details
- We have a github pr job in `./.github/workflows/prjob_tests.yml` this includes the jest test runner.
- Our tests can be identified in the codebase if you see a file ending in `<filename>_test.go`


## Jest unit and component tests/ frontend tests
In our frontend testing suite we have two types of tests that we run
- Unit tests for files that end in `.ts`
- Component tests for files that end in `.tsx`

You can find configuration in `./frontend/app/jest.config.json`
this includes which files are include and our minimum test coverage amounts.
#### Run test (this is with coverage)
- navigate to `./frontend/app`
- then type `yarn run test`

0 comments on commit 42b8154

Please sign in to comment.