pending specs

1,234 views
Skip to first unread message

James O'Brien

unread,
Jun 9, 2011, 8:37:19 PM6/9/11
to jasmi...@googlegroups.com
hey,

how do I declare a spec as pending or even just ensure an unfinished test will fail. I like to start by writing a bunch of 'it' tests before I go through and flesh them out. so it would help if I could see these tests fail/be pending until they're done.

thanks
J

Davis Frank

unread,
Jun 10, 2011, 11:18:28 AM6/10/11
to jasmi...@googlegroups.com
At the moment we don't have a proper concept of pending specs. It's in our backlog and prioritized.

The common work around is to make functions that just fail and assign them to your "pending" its.

--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.

Bill

unread,
Feb 2, 2012, 3:50:53 PM2/2/12
to jasmi...@googlegroups.com
This snippet works for me, until something official comes along:

expect('pending').toEqual('completed')

Though it fails, at least it's self-documenting for anyone else looking at my codebase.

- Bill

Rodrigo Rosenfeld Rosas

unread,
May 30, 2012, 4:14:38 PM5/30/12
to jasmi...@googlegroups.com
You could do something simpler like: throw 'pending'.

But this doesn't work for me as I'm only fine when I see my specs go green and that won't happen with pending specs. It could get orange instead of green if there are pending specs, but getting red won't allow me to quickly identify if I have broken some previously working spec...

Rodrigo Rosenfeld Rosas

unread,
May 30, 2012, 4:15:49 PM5/30/12
to jasmi...@googlegroups.com
Em quinta-feira, 2 de fevereiro de 2012 18h50min53s UTC-2, Bill escreveu:

Alberto Leal

unread,
Jun 8, 2012, 2:38:31 PM6/8/12
to Jasmine
You can put the letter "x" at the beginning, so jasmine will ignore
your test

xit("YOUR_TEST", function(){ ... });


Alberto.

On May 30, 5:15 pm, Rodrigo Rosenfeld Rosas <rr.ro...@gmail.com>
wrote:

Rodrigo Rosenfeld Rosas

unread,
Jun 8, 2012, 2:46:26 PM6/8/12
to jasmi...@googlegroups.com
Ah, thanks! I didn't know about that. Is this documented somewhere?

Cheers,
Rodrigo.

Alberto Leal

unread,
Jun 8, 2012, 3:02:07 PM6/8/12
to Jasmine
Yes, Rodrigo:

http://pivotal.github.com/jasmine/

Look for "Disabling Specs and Suites"

Alberto.

Rodrigo Rosenfeld Rosas

unread,
Jun 8, 2012, 3:04:15 PM6/8/12
to jasmi...@googlegroups.com
Thank you, I found it :)
Reply all
Reply to author
Forward
0 new messages