Response to your last code review and FLUID-3116, FLUID-3117

michelle.dsouza at utoronto.ca michelle.dsouza at utoronto.ca
Fri Aug 21 18:03:58 UTC 2009


Quoting Justin <justin.obara at utoronto.ca>:

> Hello,
>
> Here are some further thoughts.
>
> indexes
> ======
>
> I also like the idea that you have good names for your indexes.
> However, I'm only worried about them being hardcoded. The danger is
> that if even the order of the modules is changed, the tests could fail.
> What I was thinking was more along the lines of writing a function that
> will find the index of the module based on its name. This way you won't
> have to manually keep track of the indexes.

This makes a lot of sense and I completely agree.

>
> data location
> ==========
>
> It's probably better if the unit tests and the demo have no
> dependencies with each other. Currently the unit tests depend on demo
> for the data. What you could do is to keep the data in a separate file
> and include that into both pages. One possible solution would be to
> have a js file that  just sets that variable with the data.
>

I like the idea of putting the data into its own file - I think it  
will lead to easier to read code in the builder. The javascript file  
containing the data would still need to be located with the demo  
rather then with the tests since we wouldn't want the demo to depend  
on the tests directory. I'm happy as long as we don't have two copies  
of the same data to maintain. :)

Michelle







More information about the fluid-work mailing list