cemerick / clojurescript.test

A maximal port of `clojure.test` to ClojureScript. DEPRECATED
165 stars 32 forks source link

Regression between 0.3.2 and 0.3.3 #95

Closed jmckitrick closed 9 years ago

jmckitrick commented 9 years ago

Running my test suite under 0.3.2 passes.

Running it under 0.3.3 fails with this message:

TypeError: 'null' is not an object (evaluating 'a.appendChild')

and can be tracked down to this function used for testing React components:

(defn add-test-div [name](let [doc js/document body %28.-body js/document%29 div %28.createElement doc)] (.appendChild body div) div))

jeluard commented 9 years ago

Your code does not look valid according to latest ClojureScript requirements. It should be:

(defn add-test
  [div]
  (.appendChild js/body div)
  div))

Maybe using 0.3.3 brings a newer ClojureScript that has stricter semantic checks?

jmckitrick commented 9 years ago

@jeluard That's very odd, I cannot reproduce the problem now. If it reappears, I'll open another issue. Thanks!