Running a single test or a single file with jasmine-node

909 views
Skip to first unread message

robertj

unread,
Jul 27, 2011, 5:36:47 AM7/27/11
to jasmi...@googlegroups.com
Hi,

I would like to execute only one single file or even better one single "describe"
with jasmine-node. Is that possible?

Best regards

Robert

Kristian Calhoun

unread,
Jul 27, 2011, 10:59:51 AM7/27/11
to Jasmine
Hi Robert,

I added this functionality to my forked version of Jasmine on Github
(https://github.com/kristiancalhoun/jasmineAGI). With this version you
can run a single suite by changing "describe" to "odescribe".
Likewise, you can run only a single spec by changing "it" to "oit". If
there are multiple odescribes or oits, they will each run, but any
tests without an "o" flag will be skipped.

You can read the original discussion that took place as I was
developing these features here:
http://groups.google.com/group/jasmine-js/browse_thread/thread/315ea591e2d1a851/df2d64d219215954?lnk=gst

Hope this helps!
-Kristian

Davis Frank

unread,
Jul 27, 2011, 4:04:58 PM7/27/11
to jasmi...@googlegroups.com
Robert, 

Is this a desire to have "focused spec"-type functionality? Like you want to run only "this file" or "this suite" or "this test" right now?

--dwf

--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.


robertj

unread,
Jul 28, 2011, 9:54:46 AM7/28/11
to jasmi...@googlegroups.com
Hi,

yes the desire is to run a specific (subset) of test(s).

What happened just a yesterday was this. I was creating test (describe + its) with some
specific context. This specific context exposed a bug in one of my very heavily used
low-level functions.

In order to find up where the bug is i instrumented that low-level-func with some
debugging statements. Obviously this lead to an avalanche of output that made it
impossible for to see my bug.

So here it would have been very helpful to execute only the context that exposed
that bug.

Best regards

Robert
Reply all
Reply to author
Forward
0 new messages