lambdaisland / lambdaisland/kaocha-cljs
[cljs.repl.browser/repl-env] index.html must use out/main.js?
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 47
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
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
Kaocha ClojureScript client failed connecting back.
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cljs.repl.browser/default-index and the :repl-opts/:static-dir configuration described in test.edn. Reproduce the setup using test/index.html and out/main.js, then determine whether the supported outcome should be documented or whether a testing-specific index page should work. Done means the Kaocha ClojureScript client connects reliably with the documented configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- testing, web-dev
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100