bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Testing React project causes "TypeError: undefined is not an object" #144

Open Ruin0x11 opened 7 years ago

Ruin0x11 commented 7 years ago

I have a project that uses React that works fine, but when I try testing it using lein doo phantom once test, this error appears and no tests run:

;; ======================================================================
;; Testing with Phantom:

TypeError: undefined is not an object (evaluating 'ReactInternals.ReactComponentTreeHook')

  phantomjs://code/phantom1364156996536148749.js:81 in onError
Subprocess failed

I tried a fix mentioned earlier of redefining the Javascript error logging function, but it didn't work.

bensu commented 7 years ago

Hi Ruin0x11

Can you please provide a minimal project that reproduces the error?

vemv commented 6 years ago

In case it helps, chrome-headless gives better stacktraces (not always, but at least you can inspect the file, it's not an opaque phantom1364156996536148749.js:81)