diff --git a/.eslintrc.json b/.eslintrc.json index c0bbf37d..e2d3ebf8 100755 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -40,7 +40,8 @@ } ], "istanbul/no-ignore-file": "error", - "istanbul/prefer-ignore-reason": "error" + "istanbul/prefer-ignore-reason": "error", + "promise/no-callback-in-promise": "off" }, "overrides": [ { diff --git a/package.json b/package.json index 2a85b063..9a6a2b31 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "cover:browser-api:firefox:local": "scripts/cover.sh", "cover:browser-api:firefox:saucy": "scripts/cover.sh", "cover:browser-api:safari:local": "scripts/cover.sh", - ".cover:browser-api:safari:saucy": "scripts/cover.sh", + "cover:browser-api:safari:saucy": "scripts/cover.sh", "cover:browser-api": "scripts/for-all-browsers.sh", "cover": "scripts/cover-all.sh", "eslint-check": "eslint --print-config src/server/index.js | eslint-config-prettier-check", diff --git a/src/test/clients/waychaser-via-webdriver.js b/src/test/clients/waychaser-via-webdriver.js index 3dbf9edf..367b6ba6 100644 --- a/src/test/clients/waychaser-via-webdriver.js +++ b/src/test/clients/waychaser-via-webdriver.js @@ -5,19 +5,22 @@ import logging from 'selenium-webdriver/lib/logging'; class WaychaserViaWebdriver { async load(url, options) { - const result = await this.driver.executeScript( + const result = await this.driver.executeAsyncScript( /* istanbul ignore next: won't work in browser otherwise */ function () { /* global window */ + var callback = arguments[arguments.length - 1]; return window.waychaser .load(arguments[0], arguments[1]) .then((success) => { console.log({ success }); - return { success, result: 'success' }; + callback({ success, result: 'success' }); + return; }) .catch((error) => { console.log({ error }); - return { error, result: 'error' }; + callback({ error, result: 'error' }); + return; }); }, url,