diff --git a/spec/basic/handling_spec.js b/spec/basic/handling_spec.js index 60c359138..d2d0e8340 100644 --- a/spec/basic/handling_spec.js +++ b/spec/basic/handling_spec.js @@ -1,11 +1,10 @@ - -describe('handling timeout errors', function() { - - it('should call error handler on a timeout', function() { - browser.get('http://dummyUrl', 1).then(function() { +describe('handling timeout errors', () => { + it('should call error handler on a timeout', async () => { + try { + await browser.get('http://dummyUrl', 1); throw 'did not handle error'; - }, function(err) { + } catch (err) { expect(err instanceof Error).toBeTruthy(); - }); + } }); }); diff --git a/spec/basicConf.js b/spec/basicConf.js index 4c5eda123..dda89b6c2 100644 --- a/spec/basicConf.js +++ b/spec/basicConf.js @@ -10,7 +10,8 @@ exports.config = { // Spec patterns are relative to this directory. specs: [ 'basic/elements_spec.js', - 'basic/lib_spec.js' + 'basic/lib_spec.js', + 'basic/handling_spec.js' ], // Exclude patterns are relative to this directory. diff --git a/spec/ciFullConf.js b/spec/ciFullConf.js index 9245e3058..d69381691 100644 --- a/spec/ciFullConf.js +++ b/spec/ciFullConf.js @@ -11,7 +11,8 @@ exports.config = { // TODO(selenium4): revert back to basic/*_spec.js specs: [ 'basic/elements_spec.js', - 'basic/lib_spec.js' + 'basic/lib_spec.js', + 'basic/handling_spec.js' ], // Exclude patterns are relative to this directory.