I am trying to start javascript testing on Selenium, but I am stucked at the start.
MochaJS never waits for the end of test, instead throwing after 2 seconds
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/pavel/code/gscc/test/test.js)
My code is
const {Builder, By, Key, until} = require('selenium-webdriver');
let assert = require('chai').assert;
describe('Test Suite', function() {
it('should do', async function(done) {
try {
let driver = new Builder().forBrowser('firefox').build();
await driver.get('http://www.google.com/ncr');
const title = await driver.getTitle();
assert.equal(title, 'Google');
} catch(err) {
console.log(err);
} finally {
await driver.quit();
}
done();
})
})
Mocha says that I have unresolved promises in my code, but are there such?