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

Google closure classes not found? #115

Closed acron0 closed 8 years ago

acron0 commented 8 years ago

I'm using goog.Uri.QueryData to parse query parameters and when running

lein doo phantom test once

I get this error:

ERROR in (filters) (witan_viz/db.js:43:46)
simple filter =
expected: (= (db/get-filters (make-url "?filter=foo%3Dbar")) (f/Filter. nil "foo" "=" "bar"))
  actual: #object[TypeError TypeError: undefined is not a function (evaluating 'qd.get("filter")')]

Which suggests that .get isn't found on qd (QueryData). Code works fine in dev, just not in test. It's included as such:

(:import [goog.Uri QueryData])
bensu commented 8 years ago

Hi @acron0,

Is qd a Google Closure global or an instance of QueryData that you made from ClojureScript?

Do you mind providing an example with the most basic Google Closure you can find that would reproduce the error? If the Google Closure classes were not found, it would first fail whenever you construct a GC object, like new google.Uri(args) or new google.Uri.QueryData(args)

Thanks!

acron0 commented 8 years ago

PEBCAK, sorry

bensu commented 7 years ago

No problem!