Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Better Error Message Needed (and possibly better doc needed) to Cover Case of 'tests' Dir Namespace Clash #823

Closed
christopherbalz opened this Issue · 3 comments

3 participants

@christopherbalz

Issue with Error Message Quality:

Instead of just throwing 'app/tests/base/staticServer.js - 'process undefined' ' when the 'app/tests' directory has been used for something other than Mojito unit tests (say, it's been used for non-Mojito-integrated Arrow tests as in my case), Mojito should provide a more informative error message.

Backing up a little bit from the specifics, and toward the general: Reserving commonly-used namespaces (in this case, a directory named 'tests') in a framework is fine but then if at all possible, informative error messages should be thrown if the reservation is violated.

      - - - -

Possible Issue with Documentation:

The doc makes clear that Mojito uses a 'tests' dir for mojits, but not that it is (effectively) reserved (at least, as far as I read and understood), and I was surprised that it was reserved at the 'app' level in addition to the 'mojit' level (which may be my own shortcoming in understanding the documentation). I am not sure that the doc does not properly address this issue, but since I have read all of the Mojito doc and didn't recall that 'app/tests' might be reserved, the doc should be checked to make sure that point is sufficiently covered.

@zhouyaoji
Owner

Hi Christopher,

Thanks for filing the issue. The "Testing" chapter in the documentation specifies that the '{app_name}/tests' directory is for application tests: http://developer.yahoo.com/cocktails/mojito/docs/topics/mojito_testing.html

Are you looking at a different section of the documentation? I'll update that particular section or add clarification.

@christopherbalz

Agree on the doc being okay. Thank you. The error message issue should be fixed though.

@caridy
Owner

/ping @zhouyaoji, can we close this?

@caridy caridy closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.