Skip to content

Commit aebbb67

Browse files
author
Temilayo kufeji
committed
Fix issue with promises in world.js only uses the abort method when test fails .
1 parent 6240f8f commit aebbb67

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

runtime/world.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ function getDriverInstance() {
4747

4848
case 'electron': {
4949
driver = new ElectronDriver();
50-
} break;
50+
}
51+
break;
5152

5253
case 'chrome': {
5354
driver = new ChromeDriver();
@@ -223,18 +224,15 @@ module.exports = function () {
223224

224225
return driver.close().then(function () {
225226
return driver.quit();
226-
})
227-
}).then(function () {
228-
// If the test was aborted before eyes.close was called ends the test as aborted.
229-
return eyes.abortIfNotClosed();
230-
});
227+
}).then(function () {
228+
// If the test was aborted before eyes.close was called ends the test as aborted.
229+
return eyes.abortIfNotClosed();
230+
});
231+
})
231232
}
232233

233234
return driver.close().then(function () {
234235
return driver.quit();
235-
}).then(function () {
236-
// If the test was aborted before eyes.close was called ends the test as aborted.
237-
return eyes.abortIfNotClosed();
238-
});
236+
})
239237
});
240238
};

0 commit comments

Comments
 (0)