Skip to content

[🐛 Bug]: Executing config from inner folder no longer working since v8 #10127

@DIFSRIP

Description

@DIFSRIP

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.7.0

Node.js Version

19.0.1

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

Formerly in v7 we could execute a config from a inner folder calling it like npx wdio ../myFolder/test.conf.js.
Since migration to v8 I receive the error:

? Could not execute "run" due to missing configuration, file "test[.js/.ts]" not found! Would you like to
 create one? (y/N) 

Going inside a folder like npx wdio myFolder/test.conf.js or calling the config from the same folder is working fine.

I tested resolving the path before calling wdio command in our cli tool, but without success.

What is your expected behavior?

Expected behaviour is to be able to execute from any location using relative or absolute paths.

Any support is welcome!

How to reproduce the bug.

  • To reproduce the bug, init a new project using npm init wdio and select mocha as framework.
  • Let the command create the sample spec.
  • Navigate into to the test folder.
  • Execute command npx wdio ../wdio.conf.js.

Relevant log output

? Could not execute "run" due to missing configuration, file "test[.js/.ts]" not found! Would you like to
 create one? (y/N)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions