Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ouput from tests is shown #2374

Closed
astanzys opened this issue Jul 3, 2018 · 3 comments
Closed

No ouput from tests is shown #2374

astanzys opened this issue Jul 3, 2018 · 3 comments

Comments

@astanzys
Copy link

astanzys commented Jul 3, 2018

Expected behavior

Running a test via cider displays outcome in the minibuffer. In case of failure test report buffer is opened with more detailed information about failures.

Actual behavior

Namespace is evaluated but no results are shown. Test report buffer is not present. *Messages* buffer contains:

Running test a-test in cider-test.core-test...
=> #'cider-test.core-test/a-test

Steps to reproduce the problem

  1. Generate a new project using lein lein new cider-test.
  2. Execute cider-jack-in from one of the project classes.
  3. Run tests for all project. Same result when testing single namespace/test at point.

Environment & Version information

CIDER version information

;; CIDER 0.18.0snapshot (package: 20180701.1420), nREPL 0.2.13
;; Clojure 1.8.0, Java 1.8.0_171

Emacs version

GNU Emacs 25.3.2

Operating system

Mint 18

@bbatsov
Copy link
Member

bbatsov commented Jul 3, 2018

Might be related to the fix for #2357

I won't have time to investigate this soon, but I'm reasonably sure that whatever the problem is it's something really easy to fix.

@jgracin
Copy link

jgracin commented Jul 4, 2018

Yes, in function cider-test-execute, construction of the request does not work because the request variable is getting overwritten in the let* form.

Should be something like:

    (let* ((request `("op" ,(cond ((stringp ns)         "test")
                                  ((eq :project ns)     "test-all")
                                  ((eq :loaded ns)      "test-all")
                                  ((eq :non-passing ns) "retest"))))
           ;; we add optional parts of the request only when relevant
           (request (if (and (listp include-selectors) include-selectors)
                        (append request `("include" ,include-selectors))
                      request))
           (request (if (and (listp exclude-selectors) exclude-selectors)
                        (append request `("exclude" ,exclude-selectors))
                      request))
           (request (if (stringp ns)
                        (append request `("ns" ,ns))
                      request))
           (request (if (stringp ns)
                        (append request `("tests" ,tests))
                      request))
           (request (if (or (stringp ns) (eq :project ns))
                        (append request `("load?" ,"true"))
                      request)))

@bbatsov
Copy link
Member

bbatsov commented Jul 4, 2018

Yeah, I realized this as well, just didn't have time to update it. Likely I'll just reduce this to a sequence of setqs instead.

@bbatsov bbatsov closed this as completed in ac6edbe Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants