luminus-framework / luminus-framework/luminus-template

lein test fails after lein new since template 3.37

Open
#446 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
648
Forks
143
PR merge metrics
No merged PRs in 30d

Description

Looks like the change from starting with a component to starting with the function `app` has broken the default test at least with the command `lein new luminus myapp +re-frame +h2` since template version 3.37 (it fails the same with from 3.37 to the current 3.41).

```
lein new luminus myapp +re-frame +h2
cd myapp
lein test
```

The test fails with
```
lein test :only myapp-3.37.test.handler/test-app

ERROR in (test-app) (AFn.java:429)
Uncaught exception, not in assertion.
expected: nil
actual: clojure.lang.ArityException: Wrong number of args (1) passed to: myapp-3.37.handler/app
at clojure.lang.AFn.throwArity (AFn.java:429)
```

If I revert the changes in src/clj/myapp/{handler.clj,core.clj} to not have `app` be a function, the test runs fine.

Contributor guide

No contributing guide indexed for this repository

Research direction

Generate a project with `lein new luminus myapp +re-frame +h2`, then run `lein test` to reproduce the arity error. Compare the generated `src/clj/myapp/handler.clj` and `src/clj/myapp/core.clj` with the default `test-app` behavior; done means the generated project's test suite passes without reverting the `app` function change.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
backend, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.