On Sunday, July 29, 2012 4:37:20 PM UTC-4, Domenic Denicola wrote:
> 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?