(key, options)
| 86 | describe('Builder', function () { |
| 87 | describe('catches incorrect use of browser options class', function () { |
| 88 | function test(key, options) { |
| 89 | it(key, async function () { |
| 90 | let builder = new Builder().withCapabilities( |
| 91 | new Capabilities().set('browserName', 'fake-browser-should-not-try-to-start').set(key, new options()), |
| 92 | ) |
| 93 | try { |
| 94 | let driver = await builder.build() |
| 95 | await driver.quit() |
| 96 | return Promise.reject(Error('should have failed')) |
| 97 | } catch (ex) { |
| 98 | if (!(ex instanceof error.InvalidArgumentError)) { |
| 99 | throw ex |
| 100 | } |
| 101 | } |
| 102 | }) |
| 103 | } |
| 104 | |
| 105 | test('chromeOptions', chrome.Options) |
| 106 | test('moz:firefoxOptions', firefox.Options) |
no test coverage detected