We're updating the issue view to help you get more done. 

The :testing-contexts value does not survive async macro

Description

It seems like the :testing-contexts is not preserved in the test environment after (or within better) a `cljs.test/async` test.

Repro:

1 2 3 4 5 6 7 8 9 10 11 12 13 cljs.user=> (require '[cljs.test :as test :refer-macros [deftest is testing async]]) cljs.user=> (deftest test-testing-contexts #_=> (testing "not there" #_=> (async done #_=> (js/setTimeout #(do (is (= 0 1)) #_=> (done)))))) cljs.user=> (test/test-var #'cljs.user/test-testing-contexts) #object[Object] cljs.user=> FAIL in (test-testing-contexts) (at applyHandler (<eval>:NaN:28) expected: (= 0 1) actual: (not (= 0 1))

I have also inspected, using test/testing-contexts-str, the env before and after async and:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 cljs.user=> (deftest test-testing-contexts #_=> (testing "not there" #_=> (println "outside ->" (test/testing-contexts-str)) #_=> (async done #_=> (println "inside -> " (test/testing-contexts-str)) #_=> (js/setTimeout #(do (is (= 0 1)) #_=> (done)))))) cljs.user=> (test/test-var #'cljs.user/test-testing-contexts) outside -> not there inside -> #object[Object] cljs.user=> FAIL in (test-testing-contexts) (at applyHandler (<eval>:NaN:28) expected: (= 0 1) actual: (not (= 0 1))

Environment

None

Status

Assignee

Unassigned

Reporter

Andrea Richiardi

Labels

None

Approval

None

Patch

None

Priority

Major