0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00
penpot/docs/06-Testing-Guide.md

46 lines
743 B
Markdown
Raw Normal View History

# Testing guide #
## Backend / Common
You can run the tests directly with:
```bash
~/penpot/backend$ clojure -M:dev:tests
```
Alternatively, you can run them from a REPL. First starting a REPL.
```bash
~/penpot/backend$ scripts/repl
```
And then:
```bash
user=> (run-tests)
user=> (run-tests 'namespace)
user=> (run-tests 'namespace/test)
```
## Frontend
Frontend tests have to be compiled first, and then run with node.
```bash
npx shadow-cljs compile tests && node target/tests.js
```
2020-12-02 17:31:25 -05:00
Or run the watch (that automatically runs the test):
```bash
npx shadow-cljs watch tests
```
## Linter
2020-12-02 17:31:25 -05:00
We can execute the linter for the whole codebase with the following command:
```bash
2020-12-02 17:31:25 -05:00
clj-kondo --lint common:backend/src:frontend/src
```