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?
So I've read they need to be escaped twice.
--world-parameters {\\\"instanceUrl\\\": \\\"https:\\\/\\\/testserver.example.com\\\"}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.