From 8121f913cae44c8d374cb19ea6a655a670d33995 Mon Sep 17 00:00:00 2001 From: "Jimi (Dimitris) Charalampidis" Date: Tue, 14 Jun 2016 16:36:54 +0300 Subject: [PATCH] Improving test exit Test should always exit (app.stop()) either on success or failure. --- docs/tutorial/using-selenium-and-webdriver.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/using-selenium-and-webdriver.md b/docs/tutorial/using-selenium-and-webdriver.md index 4002f01..50727c7 100644 --- a/docs/tutorial/using-selenium-and-webdriver.md +++ b/docs/tutorial/using-selenium-and-webdriver.md @@ -39,12 +39,12 @@ app.start().then(function () { }).then(function (title) { // Verify the window's title assert.equal(title, 'My App') -}).then(function () { - // Stop the application - return app.stop() }).catch(function (error) { // Log any failures console.error('Test failed', error.message) +}).then(function () { + // Stop the application + return app.stop() }) ``` -- 2.7.4