Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How can I get the complete reference of the Node API?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tang Tianyong  
View profile  
 More options Nov 12 2012, 8:33 pm
From: Tang Tianyong <tan...@gmail.com>
Date: Mon, 12 Nov 2012 17:33:02 -0800 (PST)
Local: Mon, Nov 12 2012 8:33 pm
Subject: How can I get the complete reference of the Node API?

I wonder the API's just simple description, like the API assert.fail<http://nodemanual.org/0.8.14/nodejs_ref_guide/assert.html#assert.fail>,
when I follow the example code, I can not get the correct output as the
comment say:

-- Code --

var assert = require('assert');

var iX = 4;
var iY = 5;

assert.fail(iX, iY, "iX is bigger than iY", "<");
// prints nothing, because it does not fail

assert.fail(iX, iY, "iX is bigger than iY", ">");
// prints a failure, because iX > iY is not true

-- Code end --

The following is the API description:

So, Throws an exception that displays the values for actual and expected separated

> by the provided operator.

Who will explain the reason for me, thx!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mscdex  
View profile  
 More options Nov 12 2012, 10:01 pm
From: mscdex <msc...@gmail.com>
Date: Mon, 12 Nov 2012 19:01:12 -0800 (PST)
Local: Mon, Nov 12 2012 10:01 pm
Subject: Re: How can I get the complete reference of the Node API?
On Nov 12, 8:33 pm, Tang Tianyong <tan...@gmail.com> wrote:

> assert.fail(iX, iY, "iX is bigger than iY", "<");
> // prints nothing, because it does not fail

This *should* print something, and it does when I try it on node
0.8.14.

assert.fail() should *always* throw an exception. It does not do any
checks: https://github.com/joyent/node/blob/v0.8/lib/assert.js#L101


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tang Tianyong  
View profile  
 More options Nov 12 2012, 10:16 pm
From: Tang Tianyong <tan...@gmail.com>
Date: Mon, 12 Nov 2012 19:16:38 -0800 (PST)
Local: Mon, Nov 12 2012 10:16 pm
Subject: Re: How can I get the complete reference of the Node API?

Thanks for your help. The source code can explain everything. :P


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »