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

Closed
nottoseethesun opened this Issue Dec 4, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@nottoseethesun

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

This comment has been minimized.

Show comment Hide comment
@zhouyaoji

zhouyaoji Dec 8, 2012

Contributor

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.

Contributor

zhouyaoji commented Dec 8, 2012

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.

@nottoseethesun

This comment has been minimized.

Show comment Hide comment
@nottoseethesun

nottoseethesun Feb 18, 2013

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

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

@caridy

This comment has been minimized.

Show comment Hide comment
@caridy

caridy May 17, 2013

Collaborator

/ping @zhouyaoji, can we close this?

Collaborator

caridy commented May 17, 2013

/ping @zhouyaoji, can we close this?

@caridy caridy closed this Mar 3, 2014

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