Skip to content

Instantly share code, notes, and snippets.

@dfparker2002
Forked from Spoygg/test.js
Created November 22, 2015 12:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dfparker2002/8a866dd74bd3d139b85b to your computer and use it in GitHub Desktop.
describe('Test example.com', function(){
before(function(done) {
client.init().url('http://example.com', done);
});
describe('Check homepage', function(){
it('should see the correct title', function(done) {
client.getTitle(function(err, title){
expect(title).to.have.string('Example Domain');
done();
});
});
it('should see the body', function(done) {
client.getText('p', function(err, p){
expect(p).to.have.string(
'for illustrative examples in documents.'
);
done();
})
});
});
after(function(done) {
client.end();
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment