Have been searching for a bit and haven't found anything that answered my question.
I have a simple Cucumber.js project, was trying to implement profiles just like you can do in ruby under the cucumber.yml file, but can't really find out how to do it in Cucumber.js
Sorry for no specific info about the issue,
Thanks in advance
A general solution is to use Node's
process.envThere are obviously many ways to do this, and you can fit it to your needs. Here's the way I did it which puts all the profiles into a JSON file, and also supports a default profile if none is specified when running cucumber.
Have your profiles in a file
config.jsonRequire and use the config in your tests
And then select a profile when running cucumber.js from the command line
Run with profile 1
Or profile2
Or the default profile
NOTE Credit to this answer for giving me the idea of doing it this way.