Fixing clojurescript.test failing with “ReferenceError: Can’t find variable: cemerick”
Posted by Jakub Holý on May 21, 2014
cemerick.cljs.test) may fail with this confusing exception:
ReferenceError: Can't find variable: cemerick
due to couple of reasons:
- Your test namespaces do not require
cemerick.cljs.test(and thus it is missing from the compiled .js; requiring macros is not enough)
- cljsbuild has not included any of your test files (due to wrong setup etc.; this is essentially another form of #1)
- You are trying to test with the node runner but have built with
:whitespace(for node you need to concatenate everything into a single file, which only happens if you use
There is a pull request to provide a better error message but until then you have to be aware of these problems.
Example failures from all the runners:
Sorry, the comment form is closed at this time.