mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 10:12:15 +02:00
✨ Fixes tests and linter for commons
This commit is contained in:
parent
b180d9e878
commit
f37a85fd82
23 changed files with 187 additions and 168 deletions
39
docs/06-Testing-Guide.md
Normal file
39
docs/06-Testing-Guide.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# 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
|
||||
```
|
||||
|
||||
## Linter
|
||||
|
||||
We can execute the linter for the whole codebase with the following command
|
||||
|
||||
```bash
|
||||
npx clj-kondo --lint common:backend/src:frontend/src
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue