You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation under "Usage" where is done and assert coming from?
varphantom=require('x-ray-phantom');varXray=require('x-ray');varx=Xray().driver(phantom());x('http://google.com','title')(function(err,str){if(err)returndone(err);// <----------- where is this defined?assert.equal('Google',str);// <----------- where is this defined?done();// <----------- where is this defined?})
I assume they are coming from a user defined assertion library, but I feel like that should be made more clear.
The text was updated successfully, but these errors were encountered:
I think the implication is that this would live in a mocha/jasmine test, so this example would be much more clear as
varassert=require('assert');varphantom=require('x-ray-phantom');varXray=require('x-ray');varx=Xray().driver(phantom());describe('this should work',()=>{it('should get the title from google',done=>{x('http://google.com','title')(function(err,str){if(err)returndone(err);assert.equal('Google',str);done();});});});
In the documentation under "Usage" where is
done
andassert
coming from?I assume they are coming from a user defined assertion library, but I feel like that should be made more clear.
The text was updated successfully, but these errors were encountered: