Created
August 12, 2015 15:18
-
-
Save cefn/92de780976090bf89485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chai = require("chai"), | |
chaiAsPromised = require("chai-as-promised"), | |
selenium = require("selenium-standalone"), | |
wd = require("wd"), | |
Q=require("q"); | |
chai.use(chaiAsPromised); | |
chai.should(); | |
chaiAsPromised.transferPromiseness = wd.transferPromiseness; | |
describe("The End of the Internet", function(){ | |
var browser = wd.promiseChainRemote(); | |
var seleniumProcess = null; | |
before(function(){ | |
return Q.all([ | |
new Promise(function(resolve, reject){ | |
selenium.start([], function(err, child){ | |
seleniumProcess = child; | |
resolve(arguments) | |
}) | |
}), | |
browser.init({browserName:"chrome"}), | |
]) | |
}) | |
after(function(){ | |
seleniumProcess.kill("SIGINT"); | |
seleniumProcess = null; | |
}) | |
it("Can reach the end of the internet", function(){ | |
return browser.get("http://www.wwwdotcom.com/") | |
.title() | |
.should.eventually.equal("The Last Page of the Internet") | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment