Open alanjames1987 opened 8 years ago
I think the implication is that this would live in a mocha/jasmine test, so this example would be much more clear as
var assert = require('assert');
var phantom = require('x-ray-phantom');
var Xray = require('x-ray');
var x = 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) return done(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.