Not an issue. Just something that took me long enough to realize that I thought it worth writing down. When there's no index.html in ./ or out/, the repl index template cljs.repl.browser/default-index is used and tests run. But when an index is within the :static-dir vector (?), I was catching
Adding <script src="out/main.js"> </script> in the body of index.html resolved this! The browser can't talk back to kaocha without loading the instructions to do so -- painfully obvious now, not so much an hour ago.
I'm not yet familiar enough with all the repl options to come up with other solutions. It's fine for me to have a 404 script in at the bottom of index.html for all but tests. But still, I though I could make a testing specific index page (e.g. test/index.html) with something like :repl-opts {:static-dir ["test/" "." "out/"]} in test.edn. But I haven't gotten that to work.
Not an issue. Just something that took me long enough to realize that I thought it worth writing down. When there's no index.html in
./
orout/
, the repl index templatecljs.repl.browser/default-index
is used and tests run. But when an index is within the:static-dir
vector (?), I was catchingAdding
<script src="out/main.js"> </script>
in the body of index.html resolved this! The browser can't talk back to kaocha without loading the instructions to do so -- painfully obvious now, not so much an hour ago.I'm not yet familiar enough with all the repl options to come up with other solutions. It's fine for me to have a 404 script in at the bottom of index.html for all but tests. But still, I though I could make a testing specific index page (e.g.
test/index.html
) with something like:repl-opts {:static-dir ["test/" "." "out/"]}
intest.edn
. But I haven't gotten that to work.