I am using javascript, nodejs, npm, wdio, cucumber in my testing automation framework.
In my main project root folder I have wdio.conf.js
file. Suppose there is a dependency in node_modules
folder with its own wdio.conf.js
file. And suppose both wdio.conf.js has afterScenario()
hook.
Two queries:
1)I want to ask which wdio.conf.js file will be run and which afterScenario()
hook will be run?
2)Suppose I want to run afterScenario()
hook in both wdio.conf.js
files. How can I do this?
EDIT:
ROOT FOLDER:
|-some file
|-wdio.conf.js (contains afterScenario() hook)
|-package.json
|-nodes_module
|-dependency1
|-Some files
|-package.json
|-wdio.conf.js (also contains afterScenario() hook)
|-dependency2