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

CIDER cannot find test (using Boot) #2679

Closed
allentiak opened this issue Jul 23, 2019 · 4 comments
Closed

CIDER cannot find test (using Boot) #2679

allentiak opened this issue Jul 23, 2019 · 4 comments
Labels

Comments

@allentiak
Copy link

Expected behavior

All tests (there is only one) should be run, both from the console and from within Emacs.

Actual behavior

No tests (there is only one) are run from within Emacs.

Running tests in all project namespaces...
=> #'checks-and-balances.core-test/app-test
No assertions (or no tests) were run.Did you forget to use ‘is’ in your tests?

All tests (there is only one) are run from the console.

% boot test
Testing checks-and-balances.core

Testing checks-and-balances.core-test

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.

Steps to reproduce the problem

Given the following code (managed with boot), the test should be run. However, CIDER cannot find it.

Is it because the is clause is not immediately after the testing clause?

This is the full source file. The test is hard-coded to always pass.

(ns checks-and-balances.core-test
  (:require [clojure.test :refer :all]
            [checks-and-balances.core :refer :all]
            [ring.mock.request :as mock]))
(deftest app-test
  (testing "ping endpoint"
    (let [expected-ping-response {:status  200
                                  :headers {"Content-Type" "text/plain; charset=UTF-8"}
                                  :body    "pong"}]
      (is (= expected-ping-response expected-ping-response)))))

Environment & Version information

Spacemacs (develop branch) commit: bbb9d3d559fe3d6f91ef123dddb41fcc9b5bc7e2

CIDER version information

(cider-version)

CIDER 0.22.0snapshot (package: 20190720.1656)

Full CIDER startup log:

CIDER [nREPL] Starting server via /home/allentiak/opt/bin/boot -i "(require 'cider.tasks)" -d acyclic/squiggly-clojure\:0.1.9-SNAPSHOT -d nrepl\:0.6.0 -d com.billpiel/sayid\:0.0.17 -d refactor-nrepl\:2.5.0-SNAPSHOT -d cider/cider-nrepl\:0.22.0-beta8 cider.tasks/add-middleware -m com.billpiel.sayid.nrepl-middleware/wrap-sayid -m refactor-nrepl.middleware/wrap-refactor -m cider.nrepl/cider-middleware repl -s -b localhost wait

Clojure & Java

Clojure 1.10.0 (Debian package)

clojure 1.10.0-1

Java 12 (OpenJDK)

% java -version
openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+9-Debian-1)
OpenJDK 64-Bit Server VM (build 12.0.2+9-Debian-1, mixed mode)

Boot version

% boot --version
#http://boot-clj.com
#Tue Jul 23 17:48:00 ART 2019
BOOT_VERSION=2.8.3
BOOT_CLOJURE_VERSION=1.10.0
BOOT_CLOJURE_NAME=org.clojure/clojure

Emacs version

(emacs-version)

GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.4) of 2019-02-03, modified by Debian

Operating system

Debian 10.0 "buster" (with Java 12 from "unstable")

@bbatsov
Copy link
Member

bbatsov commented Jul 27, 2019

Does this work fine if the test ns is loaded? I'm guessing that on boot something might be broken with the ns discovery logic.

@allentiak
Copy link
Author

Hi, @bbatsov!
Thanks for your reply! I am extremely busy right now, but I will give it a look in a few day.

@stale
Copy link

stale bot commented Oct 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale label Oct 27, 2019
@stale
Copy link

stale bot commented Nov 26, 2019

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

@stale stale bot closed this as completed Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants