Fork me on GitHub
#clojurescript
<
2020-07-02
>
bbss08:07:53

I'm getting a build-warning on using cljs.test/async

react_devtools_backend.js:6 BUILD-WARNING in test/material_test.cljs at [84:17]
	Symbol cljs.test/IAsyncTest is not a protocol
This is with the setTimeout example from the docs copied. I'm using clojurescript "1.10.520" and shadow-cljs as build tool. Any clues to why this is happening?

thheller09:07:49

well whats in test/material_test.cljs at [84:17]? 😛

bbss09:07:38

@thheller

(deftest example-with-timeout
  (async done
         (js/setTimeout (fn []
                          ;; make assertions in async context...
                          (done) ;; ...then call done
                          )
                        0)))

bbss09:07:34

in require:

(ns test.material-test
  (:require
    [cljs.test :as t :refer-macros [deftest testing is async]]
;;more...
))

thheller09:07:09

BTW :refer-macros is so ancient history, just use :refer.

thheller09:07:20

either way should work though. not sure whats going on

thheller09:07:43

what the heck is react_devtools_backend.js:6 this about though?

bbss09:07:21

Maybe it's my react devtools plugin?

bbss09:07:35

browser.cljs:168 BUILD-WARNING in test/material_test.cljs at [98:3]
	Symbol cljs.test/IAsyncTest is not a protocol
shadow$cljs$devtools$client$browser$handle_build_complete @ browser.cljs:168
shadow$cljs$devtools$client$browser$handle_message @ browser.cljs:331
eval @ env.cljs:196
shadow$cljs$devtools$client$env$process_next_BANG_ @ env.cljs:184
shadow$cljs$devtools$client$env$process_ws_msg @ env.cljs:197
eval @ browser.cljs:412
Without that plugin.

thheller09:07:45

what does the compiler output say?

thheller09:07:03

the console is only repeating a minimal version of what the actual compiler output should show

bbss10:07:11

@thheller any suggestion?

thheller11:07:08

not a clue sorry

bbss11:07:13

@thheller updated shadow-cljs to 2.10.13 and now it works!

bbss11:07:52

awesome 🙂