bhauman / devcards

Devcards aims to provide a visual REPL experience for ClojureScript
1.53k stars 113 forks source link

Testing context string not rendered on async tests #107

Open kitsu opened 8 years ago

kitsu commented 8 years ago

This is pretty minor, but all my testing expressions lose their context div when I make them do async testing. That is the bit of descriptive text between blocks of test results. For Example:

(ns foo.test.stuff
  (:require [cljs.core.async :as ca :refer [<! timeout]])
  (:require-macros [devcards.core :as dc :refer [defcard]]
                   [cljs.test :refer [is testing async]]
                   [cljs.core.async.macros :as async-macros :refer [go]]))

(dc/deftest working-context
  "###Context shown normally"
  (testing "Math identity works"
    (is (= 1 1))))

(dc/deftest async-context
  "###Loss of context when using async"
  (testing "Math identity works"
    (async done
      (go (<! (timeout 10))
            (is (= 1 1))
            (done)))))

The first renders with context (Math identity works), the second doesn't.

;; Relevant
:dependencies [[org.clojure/clojurescript "1.8.51"]
              [org.clojure/core.async "0.2.374" :exclusions [org.clojure/tools.reader]]
              [devcards "0.2.1-7"]]
bhauman commented 8 years ago

Yeah this is a thing ... I'm sure it can be fixed.

dijonkitchen commented 6 years ago

Any updates or should it be closed?