Skip to content

Commit

Permalink
Add info about testing JS projects in DEVELOPMENT
Browse files Browse the repository at this point in the history
  • Loading branch information
ddimaria committed Jan 25, 2024
1 parent 4a88e07 commit 2fbb560
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
19 changes: 17 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Let's get everything setup to develop on Quadratic!
- [Commands while `node dev` is running](#commands-while-node-dev-is-running)
- [Running for React-only development](#running-for-react-only-development)
- [Testing](#testing)
- [Testing JavaScript Services](#testing-javascript-services)
- [Testing Quadratic Client](#testing-quadratic-client)
- [Testing Quadratic API](#testing-quadratic-api)
- [Testing Rust Crates](#testing-rust-crates)
- [Rust Coverage](#rust-coverage)
- [Linting](#linting)
Expand Down Expand Up @@ -159,7 +160,21 @@ After you successfully run the app the first time, use `node dev -ACTMF` if only

## Testing

### Testing JavaScript Services
### Testing Quadratic Client

To test quadratic-client, enter the following command from the root of the project:

```shell
npm run test:ts
```

### Testing Quadratic API

To test quadratic-api, close the existing docker network (`docker compose down`), and enter the following command from the root of the project:

```shell
npm run test:api
```

### Testing Rust Crates

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
"coverage:wasm:html": "cd quadratic-core && cd quadratic-core && grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore 'src/wasm_bindings/*' --ignore 'src/bin/*' --ignore '../*' --ignore '/*' -o coverage/html",
"coverage:wasm:view": "open quadratic-core/coverage/html/index.html",
"test:wasm": "cd quadratic-core && cargo test",
"test:ts": "cd quadratic-client && vitest",
"test:api": "npm run docker:test:dev --workspace=quadratic-api",
"test:multiplayer": "npm run test --workspace=quadratic-multiplayer",
"benchmark:rust": "cd quadratic-core && cargo bench",
"lint:clippy": "cd quadratic-core && cargo clippy --all-targets --all-features -- -D warnings",
"heroku-postbuild": "npm run build --workspace=quadratic-api",
"kill": "kill-port 3000 && kill-port 3001 && kill-port 8001 && kill-port 8000",
"test:ts": "cd quadratic-client && vitest",
"prisma:migrate": "cd quadratic-api && npm run prisma:migrate",
"docker:up": "docker compose up -d --wait && npm run prisma:migrate --workspace=quadratic-api",
"docker:down": "docker compose down",
Expand Down

0 comments on commit 2fbb560

Please sign in to comment.