Re: [nodejs] Bug with mocha + Step + node.js?

35 views
Skip to first unread message

Tim Caswell

unread,
Jul 11, 2012, 2:29:00 PM7/11/12
to nod...@googlegroups.com
As I responded on github, step catches exceptions and routes them to
the next step as an "err" argument. It's your responsibility to check
this argument in all steps and handle it.

On Tue, Jul 10, 2012 at 4:03 PM, Thijs Vermeir <thijsv...@gmail.com> wrote:
> Hi,
>
> I think I run into a bug with mocha, step and node.js.
> I have this very little program that can be run with mocha and it passes the
> test and prints hello world. However it should fail because of the not
> existing function.
> When the function with the hello world print is commented, it fails like
> expected on the not esisting function.
>
> Is this a bug or am I using the API in the wrong way?
>
> Gr,
> Thijs
>
> var step = require ('step');
>
> describe ('bug', function () {
> it ('should fail', function (done) {
> step (
> function () {
> this_is_a_not_existing_function ();
> this ();
> },
> function () {
> console.log ('hello world');
> this ();
> },
> done
> )
> })
> })
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
Reply all
Reply to author
Forward
0 new messages