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

Error when test makes 0 assertions #1599

Closed
amoe opened this issue Mar 3, 2016 · 1 comment
Closed

Error when test makes 0 assertions #1599

amoe opened this issue Mar 3, 2016 · 1 comment

Comments

@amoe
Copy link

amoe commented Mar 3, 2016

Expected behavior

Cider should either proceed as normal and say that zero assertions passed, or warn the user that they defined a test that had zero assertions.

Actual behavior

Message from emacs: error in process filter: Wrong type argument: stringp, nil

Stack trace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  propertize(nil face font-lock-type-face)
  cider-propertize(nil ns)
  cider-test-echo-summary((dict "error" 0 "fail" 0 "ns" 1 "pass" 0 "test" 0 "var" 1) (dict))
  #[257 "\306" <a lot of strange output that goes on for a long time on a long line>
  nrepl--dispatch-response((dict "id" "14" "results" (dict) "session" "3b6d0ec7-7c66-49e4-ba64-cf1bb2499309" "summary" (dict "error" 0 "fail" 0 "ns" 1 "pass" 0 "test" 0 "var" 1) "testing-ns" "wn-prototype.users-test"))
  nrepl-client-filter(#<process nrepl-connection> "d2:id2:147:resultsde7:session36:3b6d0ec7-7c66-49e4-ba64-cf1bb24993097:summaryd5:errori0e4:faili0e2:nsi1e4:passi0e4:testi0e3:vari1ee10:testing-ns23:wn-prototype.users-teste")

Steps to reproduce the problem

This is a mistake by the user, they meant to write (is (= 2 2)), but it shouldn't be an error.

(ns wn-prototype.users-test
  (:require [clojure.test :refer :all]))

(deftest my-test
  (testing "something"
      (= 2 2)))

Run this test.

Environment & Version information

CIDER version information

;; Connected to nREPL server running on port 33122 on host localhost - nrepl://localhost:33122
;; CIDER 0.11.0 (package: 20160302.2126) (Bulgaria), nREPL 0.2.12
;; Clojure 1.7.0, Java 1.7.0_91

Emacs version

24.5.1

Operating system

Debian unstable

@RickMoynihan
Copy link
Contributor

Thanks a lot

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

2 participants