• Version 7.16.13
  • Published
  • 38.4 kB
  • 4 dependencies
  • MIT license


npm i @wdio/config
yarn add @wdio/config
pnpm add @wdio/config


A helper utility to parse and validate WebdriverIO options




DEFAULT_CONFIGS: () => Omit<Options.Testrunner, 'capabilities'>;

    function isCloudCapability

    isCloudCapability: (caps: any) => boolean;

      function validateConfig

      validateConfig: <T>(defaults: any, options: T, keysToKeep?: (keyof T)[]) => T;
      • validates configurations based on default values

        Parameter defaults

        object describing all allowed properties

        Parameter options

        option to check against {Object} validated config enriched with default values


      class ConfigParser

      class ConfigParser {}


        _pathService?: PathService,
        _moduleRequireService?: ModuleRequireService

          method addConfigFile

          addConfigFile: (filename: string) => void;
          • merges config file with default values

            Parameter filename

            path of file relative to current directory

          method addService

          addService: (service: any) => void;
          • Add hooks from an existing service to the runner config.

            Parameter service

            an object that contains hook methods.

          method autoCompile

          autoCompile: () => void;

            method filterSpecs

            filterSpecs: (specs: Spec[], exclude: string[]) => Spec[];
            • returns specs files with the excludes filtered

              Parameter spec

              files - list of spec files

              Parameter exclude

              files - list of exclude files {String[] | String[][]} list of spec files with excludes removed

            method getCapabilities

            getCapabilities: (
            i?: number
            ) =>
            | Capabilities.DesiredCapabilities
            | Capabilities.W3CCapabilities
            | Capabilities.RemoteCapabilities;
            • return capabilities

            method getConfig

            getConfig: () => any;
            • return configs

            method getFilePaths

            static getFilePaths: (
            patterns: Spec[],
            omitWarnings?: boolean,
            findAndGlob?: PathService,
            hierarchyDepth?: number
            ) => Spec[];
            • returns a flattened list of globbed files

              Parameter filenames

              list of files to glob

              Parameter flag

              to indicate omission of warnings

              Parameter file

              system path service for expanding globbed file names

              Parameter hierarchy

              depth to prevent recursive calling beyond a depth of 1 {String[] | String[][]} list of files

            method getSpecs

            getSpecs: (capSpecs?: string[], capExclude?: string[]) => Spec[];
            • get excluded files from config pattern

            method merge

            merge: (object?: MergeConfig) => void;
            • merge external object with config object

              Parameter object

              desired object to merge into the config object

            method setFilePathToFilterOptions

            setFilePathToFilterOptions: (
            cliArgFileList: string[],
            config: Spec[]
            ) => string[];
            • sets config attribute with file paths from filtering options from cli argument

              Parameter cliArgFileList

              list of files in a string form

              Parameter config

              config object that stores the spec and exclude attributes cli argument {String[]} List of files that should be included or excluded


            interface ModuleRequireService

            interface ModuleRequireService {}

              method require

              require: <T>(module: string) => T;

                method resolve

                resolve: (request: string, options?: { paths?: string[] }) => string;

                  interface PathService

                  interface PathService {}

                    method ensureAbsolutePath

                    ensureAbsolutePath: (path: string) => string;

                      method getcwd

                      getcwd: () => string;

                        method glob

                        glob: (pattern: string) => string[];

                          method isFile

                          isFile: (path: string) => boolean;

                            method loadFile

                            loadFile: <T>(path: string) => T;

                              Package Files (5)

                              Dependencies (4)

                              Dev Dependencies (2)

                              Peer Dependencies (0)

                              No peer dependencies.


                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@wdio/config.

                              • Markdown
                              • HTML
                                <a href="https://www.jsdocs.io/package/@wdio/config"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>