cucumber-js icon indicating copy to clipboard operation
cucumber-js copied to clipboard

Document inaccuracy for worldParameters

Open laorient opened this issue 2 years ago • 1 comments

👓 What did you see?

In doc/support_files/world.md, it describes putting worldParameters in config file using { worldParameters: { appUrl: 'http://localhost:3000/' } } In reality, it should be under default: { default: { worldParameters: { appUrl: 'http://localhost:3000/' } }}

Otherwise, the config doesn't work.

✅ What did you expect to see?

Fix the documentation

📦 Which tool/library version are you using?

cucumber js 9.3.0

🔬 How could we reproduce it?

Just add a config file to a cucumber js project and try to print the value of the configured parameter at the start

📚 Any additional context?

None

laorient avatar Aug 30 '23 18:08 laorient

Thanks for raising this @laorient. You're right that it's a bit confusing as it is. The reason we don't always include default is because that's the default profile and you can have other profiles, and also for config files in ES Module format that use named exports it wouldn't be applicable.

I'll try to come up with a pattern to express it more clearly and roll that out.

davidjgoss avatar Aug 31 '23 16:08 davidjgoss