Add unit and integration tests
I won't be lying, Claude Code was extremely helpful to write those tests, although it had a lot of issues with properly using in-memory SQLite (db and integration tests) and with parsing responses (integration test).
This commit is contained in:
@@ -9,11 +9,14 @@ endpoints :
|
||||
* `POST /items`: creates an item
|
||||
* `GET /items`: returns the list of items
|
||||
|
||||
## Usage
|
||||
## Running and testing
|
||||
|
||||
This project uses Leiningen. Assuming you already have Leiningen installed,
|
||||
running the API should be as easy as cloning the repo and issuing `lein run`. By
|
||||
default, the server listens on port 3000.
|
||||
default, the server listens on port 3000. To explore the API using Swagger UI,
|
||||
you can head to <http://localhost:3000/doc>.
|
||||
|
||||
To run the unit and integration tests: `lein test`
|
||||
|
||||
## Structure
|
||||
|
||||
@@ -48,3 +51,4 @@ The following links proved more than useful when working on this assignment:
|
||||
* <https://cljdoc.org/d/com.github.seancorfield/next.jdbc/1.3.1086/doc/getting-started>
|
||||
* <https://cljdoc.org/d/metosin/reitit/0.10.0/doc/ring/swagger-support>
|
||||
* <https://www.baeldung.com/clojure-ring>
|
||||
* <https://practical.li/clojure/testing/unit-testing/>
|
||||
|
||||
Reference in New Issue
Block a user