webdriverio / webdriverio

Next-gen browser and mobile automation test framework for Node.js
http://webdriver.io
MIT License
9.07k stars 2.51k forks source link

browser.config is throwing type errors for custom fields in WDIO v7 #7227

Closed velgersdyk25 closed 3 years ago

velgersdyk25 commented 3 years ago

Recently upgraded from v6 to v7 and encountered a type error _Error:(10, 31) TS2339: Property 'AUTH0_BASE_URL' does not exist on type 'Testrunner | WebdriverIO'._. This is when its called using browser.config call. Environment (please complete the following information):

Config of WebdriverIO / eslint-disable @typescript-eslint/no-var-requires / const debug = process.env.DEBUG; const defaultMochaTimeout = 600000000000000; const WebdriverIOHelpers = require("../../lib/util/webdriverIOHelpers"); const ElementHelpers = require("../../lib/util/elementHelpers"); const windowHeight = 1080; const windowWidth = 1920;

require("dotenv").config();

exports.baseConfig = { AUTH0_BASE_URL: "google.com" waitforTimeout: 10000, reporters: [ "spec", [ "mochawesome", { outputDir: "./Results", outputFileFormat: function(opts) { return results-${opts.cid}.${opts.capabilities}.json; }, }, ], ], mochawesomeOpts: { includeScreenshots: true, },

mochaOpts: { ui: "bdd", timeout: debug ? 9000000000 : defaultMochaTimeout, requires: ["tsconfig-paths/register"], }, // onPrepare: function(config, capabilities) { // }, /**