New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helpful error when missing cemerick.cljs.test #59

Merged
merged 1 commit into from May 21, 2014

Conversation

Projects
None yet
3 participants
@holyjak
Copy link
Contributor

holyjak commented May 21, 2014

Display a helpful error message instead of
"ReferenceError: Can't find variable: cemerick"
when either there were no test files included in
the build or when they did not require
cemerick.cljs.test.

Based on #51 and the latest code, improved to also kick in if there is no test file and to warn that
Node does not work with none/whitespace optimizations.

Jakub Holy
Helpful error when missing cemerick.cljs.test
Display a helpful error message instead of
"ReferenceError: Can't find variable: cemerick"
when either there were no test files included in
the build or when they did not require
cemerick.cljs.test.

@cemerick cemerick merged commit cbd4855 into cemerick:master May 21, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@cemerick

This comment has been minimized.

Copy link
Owner

cemerick commented May 21, 2014

Thanks, this is great!

The only wrinkle is that, on phantomjs, a stack trace is still shown prior to the new message, e.g.:

TypeError: 'undefined' is not an object (evaluating '$.b.test')

  target/testable.js:4899
  target/testable.js:5172

ERROR: cemerick.cljs.test was not required.

I don't see anything in the runners that would produce this, so I guess it's just an automatic reporting implicitly by phantomjs itself?

@cemerick cemerick added this to the 0.3.1 milestone May 21, 2014

@holyjak

This comment has been minimized.

Copy link
Contributor

holyjak commented May 21, 2014

You are welcome :-)
I have noticed that with phantomjs but I think it is something we can live with. I guess it is as you say, something that phantom itself does.

@noprompt

This comment has been minimized.

Copy link

noprompt commented May 21, 2014

OMG @jakubholynet you're the man! I just couldn't find the time to wrap this up. Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment