[💡 Feature]: Provide a public interface to receive the current spec file
#12.535 aperta il 20 mar 2024
Metriche repository
- Star
- (6029 star)
- Metriche merge PR
- (Merge medio 15g 15h) (48 PR mergiate in 30 g)
Descrizione
Is your feature request related to a problem?
As a developer or QA tester I would like to know which spec file the worker is running in order to execute the right steps in my require or other type of setup script.
Currently the only way to get ahold of the spec file that is being run in the worker is through a custom service. However there are ways to run setup scripts outside of services, e.g. mochaOpts.require that might want to use this type of information.
Describe the solution you'd like.
Come up with a public interface to retrieve the information of which spec files are being run in the worker. We could introduce a new environment variable e.g. WDIO_SPEC_FILES that contains a stringified version of an array with the absolute paths to the test files.
Describe alternatives you've considered.
n/a
Additional context
issue came up in https://github.com/ionic-team/stencil/pull/5542
Code of Conduct
- I agree to follow this project's Code of Conduct