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
Problem with assert
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
 
Jackie Gleason  
View profile  
 More options Jul 29 2012, 4:25 pm
From: Jackie Gleason <jackieglea...@gmail.com>
Date: Sun, 29 Jul 2012 13:25:24 -0700 (PDT)
Local: Sun, Jul 29 2012 4:25 pm
Subject: Problem with assert

I have the following code...

describe('cookie', function(){
  ..
  describe('#execute()',function(){
    it('Should return a cookie', function(){
      cookie.setUsername("user");
      cookie.setPassword("password");
      nock('https://accounts.google.com')
                .get('/ServiceLogin?service=sj')
                .reply(200, '<input type="hidden" name="dsh" id="dsh"
value="-4906219821262685280"><input type="hidden" name="GALX"
value="eSdl2XQF6dk">');
      cookie.execute(function(err,dsh,galx,cookie){
        *console.log('-4906219821262685280' == dsh)*
*        assert.equals('-4906219821262685280',dsh)*
        assert.equals('eSdl2XQF6dk',galx)
      })
    })

But when I run I see...

true
.

  ✖ 1 of 2 tests failed:

  1) cookie #execute() Should return a cookie:
     TypeError: Object function ok(value, message) {
  if (!!!value) fail(value, true, message, '==', assert.ok);

} has no method 'equals'

What do I have to do to get this right?

 
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.
Domenic Denicola  
View profile  
 More options Jul 29 2012, 4:37 pm
From: Domenic Denicola <dome...@domenicdenicola.com>
Date: Sun, 29 Jul 2012 20:37:20 +0000
Local: Sun, Jul 29 2012 4:37 pm
Subject: RE: Problem with assert

I think it’s assert.equal, not assert.equals:

http://nodejs.org/docs/latest/api/assert.html

From: mochajs@googlegroups.com [mailto:mochajs@googlegroups.com] On Behalf Of Jackie Gleason
Sent: Sunday, July 29, 2012 16:25
To: mochajs@googlegroups.com
Subject: Problem with assert

I have the following code...

describe('cookie', function(){
  ..
  describe('#execute()',function(){
    it('Should return a cookie', function(){
      cookie.setUsername("user");
      cookie.setPassword("password");
      nock('https://accounts.google.com')
                .get('/ServiceLogin?service=sj')
                .reply(200, '<input type="hidden" name="dsh" id="dsh" value="-4906219821262685280"><input type="hidden" name="GALX" value="eSdl2XQF6dk">');
      cookie.execute(function(err,dsh,galx,cookie){
        console.log('-4906219821262685280' == dsh)
        assert.equals('-4906219821262685280',dsh)
        assert.equals('eSdl2XQF6dk',galx)
      })
    })

But when I run I see...

true
.

  ✖ 1 of 2 tests failed:

  1) cookie #execute() Should return a cookie:
     TypeError: Object function ok(value, message) {
  if (!!!value) fail(value, true, message, '==', assert.ok);

} has no method 'equals'

What do I have to do to get this right?

 
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.
Jackie Gleason  
View profile  
 More options Jul 29 2012, 4:48 pm
From: Jackie Gleason <jackieglea...@gmail.com>
Date: Sun, 29 Jul 2012 13:48:49 -0700 (PDT)
Local: Sun, Jul 29 2012 4:48 pm
Subject: Re: Problem with assert

Dope thanks!


 
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 »