Suggestions wanted on how to organize a large number of tests

0 views
Skip to first unread message

pedz

unread,
Apr 17, 2010, 1:01:10 PM4/17/10
to jspec
This is my first real time to do TDD with Javascript. I'm writing a
javascript library that will parse a particular type of file and then
from there I hope to display this information in an SVG element. So,
its a rather large project with probably five levels of functionality
stacked on top of each other.

Right now I have the low level scanner, a tokenizer, and a parser. I
have tests for each of those but they are in separate files. Right
now, things are a bit disorganized because I "set aside" the tests
I've written when I move on to another part of the project.

I'm wondering how you guys organize things like this. I'm familiar
with Rails and its test concepts where there are levels of tests:
individual tests, then a group of tests for one part, and then groups
of the groups. I don't see that in jspec. Thats not really the
question. I can build stuff up like that myself. The question is if
that is how people usually do it or is there a method that is more
generally used?

Do you just kick off jspec with different dom.html files or do you
glue a more complex test wrapper on top of jspec or yet some other way
that I haven't thought of yet?

Thanks,
Perry

--
JSpec thanks you for your interest and support! To post simply reply
to this email.

documentation: http://jspec.info
unsubscribe: jspec+un...@googlegroups.com
group: http://groups.google.com/group/jspec

vision media [ Tj Holowaychuk ]

unread,
Apr 19, 2010, 2:50:51 PM4/19/10
to js...@googlegroups.com
One of my main concerns with JSpec, was that I wanted it
super easy to use, and no dependencies on the ruby executable.

So that being said it is somewhat harder to run specific sets of suites,
because you cant just glob some files etc. Then again like you mentioned
it is really easy to just come up with separate html files (or just js for node etc).

So IMO I would just do that, or you could have a small bash script that generates
these as a tempfile and opens in the browser etc
--
Tj Holowaychuk
Vision Media
President & Creative Lead
Reply all
Reply to author
Forward
0 new messages