Reputation: 7113
For a Puppeteer test I want to execute UI tests with a package.json script:
"scripts": {
"test:ui": "cucumber-js --require-module ts-node/register --require test/step_definitions/**/*.ts --require test/support/**/*.ts --world-parameters {\"instanceUrl\":\"https://testserver.example.com\"}",
},
The --world-parameters argument should be passed as JSON. How do I escape the " characters?
Upvotes: 0
Views: 1256
Reputation: 1229
So I've read they need to be escaped twice.
--world-parameters {\\\"instanceUrl\\\": \\\"https:\\\/\\\/testserver.example.com\\\"}
https://github.com/cucumber/cucumber-js/issues/1045
Upvotes: 3