Assert vs. Verify

1,142 views
Skip to first unread message

Joseph

unread,
Mar 13, 2014, 11:39:40 AM3/13/14
to nightw...@googlegroups.com
This may be a very easy question to answer:

The reference documents say - 

Nightwatch.js instance has two objects containing the same methods to perform assertions on elements:

  • .assert - when an assertion fails, the test ends, skipping all other assertions.
  • .verify - when an assertion fails, the test logs the failure and continues with other assertions.

Does this mean I can do - this.assert.equal(...) and this.verify.equal(...) ?  When I try verify, the command line tells me equal is not a valid method:

" TypeError: Object #<Object> has no method 'equal' "

Andrei Rusu

unread,
Mar 13, 2014, 11:46:43 AM3/13/14
to Joseph, nightw...@googlegroups.com
Yes, sorry, that's a current problem which is being correct for v0.4.
> --
> You received this message because you are subscribed to the Google Groups
> "NightwatchJs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nightwatchjs...@googlegroups.com.
> To post to this group, send email to nightw...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nightwatchjs/7a24c250-ff59-4f08-8a16-7648c53b5c20%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Joseph

unread,
Mar 18, 2014, 11:20:13 AM3/18/14
to nightw...@googlegroups.com
Thanks for updating the code here.  As of 0.4, I can use .verify.ok/equal .  That helps out a lot.  Keep up the good work.
Reply all
Reply to author
Forward
0 new messages