FAQ
I've been trying to gear my development to be more test oriented and one
thing I've run into was not being able to test the going-ons of my app that
happen internally without effect to the outside world. When a request comes
in I would like to make sure certain things happen within the server but I
have no real way to check on that. Custom middlewares come to mind but
there are other instances as well. I've resorted to setting custom headers
when in testing environments that only get sent if what I wanted happened
but this is not ideal. I feel like I may be missing something obvious with
testing stuff like this, any tips?

--
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Boris Egorov at Jan 23, 2013 at 5:30 am
    Your tests can talk to third party logging facility, that your app
    also uses (like winston or Bunyan logs) to ensure that things you
    anticipate really happens.
    On Wednesday, January 23, 2013, taterbase wrote:

    I've been trying to gear my development to be more test oriented and one
    thing I've run into was not being able to test the going-ons of my app that
    happen internally without effect to the outside world. When a request comes
    in I would like to make sure certain things happen within the server but I
    have no real way to check on that. Custom middlewares come to mind but
    there are other instances as well. I've resorted to setting custom headers
    when in testing environments that only get sent if what I wanted happened
    but this is not ideal. I feel like I may be missing something obvious with
    testing stuff like this, any tips?

    --
    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 nodejs@googlegroups.com<javascript:_e({}, 'cvml', 'nodejs@googlegroups.com');>
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com <javascript:_e({}, 'cvml',
    'nodejs%2bunsubscribe@googlegroups.com');>
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    ---------
    Boris Egorov
    skype/gtalk/nickname: dolphin278
    mobile: +7 905 728 1543

    --
    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 nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Greelgorke at Jan 23, 2013 at 8:51 am
    depending on what you actually test you might try sinonjs. its a
    stub/spy/mock framework. you could mock your internals and preprogram
    expected behavior. i.E. function A, then function B then function C 3 times
    etc.

    http://sinonjs.org/docs/#mocks

    Am Mittwoch, 23. Januar 2013 05:34:18 UTC+1 schrieb taterbase:
    I've been trying to gear my development to be more test oriented and one
    thing I've run into was not being able to test the going-ons of my app that
    happen internally without effect to the outside world. When a request comes
    in I would like to make sure certain things happen within the server but I
    have no real way to check on that. Custom middlewares come to mind but
    there are other instances as well. I've resorted to setting custom headers
    when in testing environments that only get sent if what I wanted happened
    but this is not ideal. I feel like I may be missing something obvious with
    testing stuff like this, any tips?
    --
    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 nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedJan 23, '13 at 4:34a
activeJan 23, '13 at 8:51a
posts3
users3
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase