{"action":"closed","issue":{"url":"https://api.github.com/repos/plumatic/schema/issues/346","repository_url":"https://api.github.com/repos/plumatic/schema","labels_url":"https://api.github.com/repos/plumatic/schema/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/plumatic/schema/issues/346/comments","events_url":"https://api.github.com/repos/plumatic/schema/issues/346/events","html_url":"https://github.com/plumatic/schema/issues/346","id":139742307,"number":346,"title":"aync tests will throw exception if (use-fixtures :once schema.test/validate-schemas) is enabled","user":{"login":"dqdinh","id":739938,"avatar_url":"https://avatars.githubusercontent.com/u/739938?v=3","gravatar_id":"","url":"https://api.github.com/users/dqdinh","html_url":"https://github.com/dqdinh","followers_url":"https://api.github.com/users/dqdinh/followers","following_url":"https://api.github.com/users/dqdinh/following{/other_user}","gists_url":"https://api.github.com/users/dqdinh/gists{/gist_id}","starred_url":"https://api.github.com/users/dqdinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dqdinh/subscriptions","organizations_url":"https://api.github.com/users/dqdinh/orgs","repos_url":"https://api.github.com/users/dqdinh/repos","events_url":"https://api.github.com/users/dqdinh/events{/privacy}","received_events_url":"https://api.github.com/users/dqdinh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-10T00:14:55Z","updated_at":"2016-03-10T20:18:47Z","closed_at":"2016-03-10T20:18:47Z","body":"cljs.test will abort test runs with message \"Async tests require fixtures to be specified as maps.  Testing aborted.\" if ```(cljs.test/use-fixtures :once schema.test/validate-schemas)``` is added to a test files with async tests.\r\n\r\nFor example:\r\n```clojure\r\n (ns frontendtest.handlers\r\n   (:require\r\n    [schema.test]\r\n    [cljs.test :as t :refer-macros [async deftest is testing run-tests]])) \r\n\r\n(t/use-fixtures :once schema.test/validate-schemas\r\n\r\n(deftest async-test\r\n  (async done\r\n         (let [a 1]\r\n           (js/setTimeout (fn []\r\n                            (is (= 1 a))\r\n                            (done))\r\n                          100)\r\n           (is (= 1 a)))))\r\n```\r\n\r\nHowever, if I rewrite the fixtures to specify them as maps using something like ```(use-fixtures :once {:before (fn [] schema.test/validate-schemas)})```, validate-schemas does not run.\r\n\r\nI think this is related to the fact that wrapping fixtures as a function is incompatible with async tests [1] and this is what schema.test/validate-schemas does [2].\r\n\r\nAny suggestions to bypass this?\r\n\r\nUsing validate schemas is really convenient so my currently solution is to create a separate file for async tests and wrap schema.core/with-fn-validation around functions that I want validated.\r\n\r\n[1] https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/test.cljs##L199-L211\r\n[2] https://github.com/plumatic/schema/blob/master/src/cljx/schema/test.cljx#L6-L11"}}