practicalli / practicalli/clojure-web-services
Compojure-api testing
Open
Nobody has claimed this yet.
API
compojure
testing
- Dominant language
- Markdown
- Stars
- 16
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
trouble testing routes in an app that uses compojure-api. One of the handlers is asynchronous and returns a channel. The server runs fine, but when running tests the async handler produces the following exception:
java.lang.IllegalArgumentException: No implementation of method: :render of protocol: #'compojure.response/Renderable found for class: clojure.core.async.impl.channels.ManyToManyChannel```
(edited)
Since i’m using lein-ring to run the server and build the uberjar and it works fine under those conditions, I assume I’ve missed some bit of configuration in the tests. If anyone could point me in the direction of some docs (or a solution!) it’d be much appreciated. I can’t find anything that looks relevant on the repos for compojure-api or ring
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the exception in the route tests and compare that setup with the lein-ring server and uberjar configuration. The issue names no source file or test; done would require identifying the missing test configuration and confirming that asynchronous handlers returning channels can be tested without the Renderable exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- api, backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100