Apologies -- I chose the wrong subject for my original thread. (My situation 
has nothing to do with dommy and is only tangentially related to CodeMirror.) 

I've posted the actual question on StackOverflow, reproduced here:

http://stackoverflow.com/questions/42212114/clojurescript-boot-make-external-libs-available-to-test-code

When using boot, how does one make external JavaScript libraries available to 
test code (vs application code)?

Application code can get access when it's included on the same HTML page as the 
library.

(With leiningen and figwheel, the test code ran in the same context as the 
application code -- on my index.html page -- so the test code was aware of the 
third party js library.)

Is there a similar page context in boot for test code? Or is there a way to 
conj something like ["resources/third-party/library.js"] onto a source or 
resource path, such that unit tests can refer to the same library that 
application code does?

When I run boot auto-test it says #object[ReferenceError ReferenceError: Can't 
find variable: CodeMirror]. CodeMirror is the third party library in my case. 
My unit tests need a CodeMirror instance so they can .setValue, then call a 
bunch of CodeMirror methods to tell the instance what to do, then verify the 
instance's new value and cursor position.

Here's part of my build.boot file:

(deftask testing []
  (set-env! :source-paths #(conj % "test/cljs"))
  identity)

(deftask test []
  (comp (testing)
        (test-cljs :js-env :phantom
                   :exit?  true)))

(deftask auto-test []
  (comp (testing)
        (watch)
        (test-cljs :js-env :phantom)))

for reference, the original thread: 
https://groups.google.com/d/msg/clojurescript/pmokEiYvwJg/COtN7SBICwAJ

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to