Я запускаю этот тест, и кажется, что когда тест попадает в функциональную часть моего блока описания, он пропускает все это и дает ложное положительное значение для прохождения.Webdriverio Node.js Mocha Chai test skips описывает блок
// required libraries
var webdriverio = require('webdriverio');
var describe = require('describe');
var after = require('after');
console.log("Lets begin");
describe('Title Test for google site', function() {
console.log("MARTY!!");
// set timeout to 10 seconds
this.timeout(10000);
var driver = {};
console.log("before we start");
// hook to run before tests
before(function (done) {
// load the driver for browser
console.log("before browser");
driver = webdriverio.remote({ desiredCapabilities: {browserName: 'firefox'} });
driver.init(done);
});
it('should load correct page and title', function() {
// load page, then call function()
return driver
.console.log("before site")
.url('http://www.ggogle.com')
// get title, then pass title to function()
.getTitle().then(function (title) {
// verify title
(title).should.be.equal("google");
// uncomment for console debug
// console.log('Current Page Title: ' + title);
});
});
});
// a "hook" to run after all tests in this block
after(function(done) {
driver.end(done);
});
console.log ("Fin");
Это выход я получаю
Позволяет начать
Fin
[Законченный в 0.4 сек]
Как вы можете видеть, что пропускает все остальное.
Да, я сделал это раньше, и это выводило это описание и после этого не было определено. – Lupin
Как вы проводите тесты? Какова ваша командная строка? – Louis
node testname.js в iTerminal или я просто запускаю код в Sublime – Lupin