[Feedhenry-raincatcher] Placement of client, server, mocks, stubs, fixtures in raincatcher modules

Paolo Haji phaji at redhat.com
Thu Feb 9 12:45:59 UTC 2017


We just recently tried to adopt the **/*-spec convention for our unit
tests, most of the tests in the test/ folders are old and were broken, so
we went for this new naming when the unit-testing initiative started.
The choice came mostly from a blog post discussing the benefits
specifically in the context of an Angular project IIRC, but I think it also
applies nicely to node+mocha.

It might be that part of the team wasn't aware of this, since there have
been some new tests added to test/ folders (I moved some of these in the
-mediator repo myself), and I don't think we wrote it down anywhere, though!

On Thu, Feb 9, 2017 at 10:38 AM, Wojciech Trocki <wtrocki at redhat.com> wrote:

> Good observation David and really good timing. I think best would be to
> log new ticket's for those separate issues.
> DevExp team already working now on unit tests coverage and as part of that
> we can make this more unified.
>
> Team is also working on separation for angular code so this would be great
> feedback to consider.
>
> Wojciech Trocki
> Software Engineer, Red Hat Mobile
>
> On Thu, Feb 9, 2017 at 10:20 AM, David Martin <davmarti at redhat.com> wrote:
>
>> Hey folks,
>>
>> As someone who is at page 0 of the Raincatcher stuff (trying to
>> understand what it is and how it all fits together), I have a few questions
>> about module structure.
>>
>> First is about the location of client & server files.
>> I'm wondering why these files tend to be put together in the same
>> directory? This has been a point of confusion when trying to understand the
>> modules.
>> For example, the user-client.js & user-router.js files in
>> https://github.com/feedhenry-raincatcher/raincatcher-
>> user/tree/master/lib/user are intended for the browser and node.js
>> respectively.
>> Is there a convention in place or docs that explain how to easily tell if
>> a file is client or server side?
>> Will all client side files have -client in the name?
>>
>> This doesn't seem to always be the case either.
>> In this module, all the client side files (bar 1?) are in an angular
>> folder https://github.com/feedhenry-raincatcher/raincatcher-
>> sync/tree/master/lib
>> Is anyone else having this difficulty when getting started?
>>
>>
>> Second is about the location of location of tests (and related fixtures &
>> mocks).
>> In 1 repo, there's a top level 'test' folder
>> https://github.com/feedhenry-raincatcher/raincatcher-sync/tr
>> ee/master/test
>> and all tests for both client & server seem to be beneath that.
>> In another, there are -spec files alongside the code
>> https://github.com/feedhenry-raincatcher/raincatcher-
>> user/tree/master/lib/user
>> Similar to above question, is there a convention for where to put test
>> files.
>> Is the plan to follow 1 convention for all raincatcher modules?
>>
>>
>>
>> --
>> David Martin
>> Red Hat Mobile
>> Twitter: @irldavem
>> IRC: @irldavem (feedhenry, mobile-internal)
>>
>> _______________________________________________
>> Feedhenry-raincatcher mailing list
>> Feedhenry-raincatcher at redhat.com
>> https://www.redhat.com/mailman/listinfo/feedhenry-raincatcher
>>
>>
>
> _______________________________________________
> Feedhenry-raincatcher mailing list
> Feedhenry-raincatcher at redhat.com
> https://www.redhat.com/mailman/listinfo/feedhenry-raincatcher
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/feedhenry-raincatcher/attachments/20170209/3915f2db/attachment.htm>


More information about the Feedhenry-raincatcher mailing list