0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-07 15:39:42 -05:00
penpot/docs/06-Testing-Guide.md
2020-12-02 23:31:25 +01:00

743 B

Testing guide

Backend / Common

You can run the tests directly with:

~/penpot/backend$ clojure -M:dev:tests

Alternatively, you can run them from a REPL. First starting a REPL.

~/penpot/backend$ scripts/repl

And then:

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.

npx shadow-cljs compile tests && node target/tests.js

Or run the watch (that automatically runs the test):

npx shadow-cljs watch tests

Linter

We can execute the linter for the whole codebase with the following command:

clj-kondo --lint common:backend/src:frontend/src