aboutsummaryrefslogtreecommitdiff
path: root/node_modules/selenium-webdriver/test/remote_test.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-16 01:59:39 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-16 02:00:31 +0100
commitbd65bb67e25a79b019d745b7262b2008ce2adb15 (patch)
tree89e1b032103a63737f1a703e6a943832ef261704 /node_modules/selenium-webdriver/test/remote_test.js
parentf91466595b651721690133f58ab37f977539e95b (diff)
incrementally verify denoms
The denominations are not stored in a separate object store.
Diffstat (limited to 'node_modules/selenium-webdriver/test/remote_test.js')
-rw-r--r--node_modules/selenium-webdriver/test/remote_test.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/node_modules/selenium-webdriver/test/remote_test.js b/node_modules/selenium-webdriver/test/remote_test.js
index 5edc448bb..9b2b2eb73 100644
--- a/node_modules/selenium-webdriver/test/remote_test.js
+++ b/node_modules/selenium-webdriver/test/remote_test.js
@@ -26,6 +26,8 @@ var promise = require('../').promise,
cmd = require('../lib/command'),
remote = require('../remote');
+const {enablePromiseManager} = require('../lib/test/promise');
+
describe('DriverService', function() {
describe('start()', function() {
var service;
@@ -41,36 +43,34 @@ describe('DriverService', function() {
return service.kill();
});
- it('fails if child-process dies', function(done) {
+ it('fails if child-process dies', function() {
this.timeout(1000);
- service.start(500)
- .then(expectFailure.bind(null, done), verifyFailure.bind(null, done));
+ return service.start(500).then(expectFailure, verifyFailure);
});
- it('failures propagate through control flow if child-process dies',
- function(done) {
- this.timeout(1000);
+ enablePromiseManager(function() {
+ describe(
+ 'failures propagate through control flow if child-process dies',
+ function() {
+ it('', function() {
+ this.timeout(1000);
- promise.controlFlow().execute(function() {
- promise.controlFlow().execute(function() {
- return service.start(500);
+ return promise.controlFlow().execute(function() {
+ promise.controlFlow().execute(function() {
+ return service.start(500);
+ });
+ }).then(expectFailure, verifyFailure);
+ });
});
- })
- .then(expectFailure.bind(null, done), verifyFailure.bind(null, done));
- });
+ });
- function verifyFailure(done, e) {
- try {
- assert.ok(!(e instanceof promise.CancellationError));
- assert.equal('Server terminated early with status 1', e.message);
- done();
- } catch (ex) {
- done(ex);
- }
+ function verifyFailure(e) {
+ assert.ok(!(e instanceof promise.CancellationError));
+ assert.equal('Server terminated early with status 1', e.message);
}
- function expectFailure(done) {
- done(Error('expected to fail'));
+ function expectFailure() {
+ throw Error('expected to fail');
}
});
});