yargs/yargs#1909

node v10.24.1
version: 1.0.0
endpointsharetweet
Test case for https://github.com/yargs/yargs/issues/1909
const yargs16 = require("yargs@16.2.0"); const yargs17 = require("yargs@17.0.0-candidate.10"); const { hideBin } = require("yargs/helpers"); console.log("yargs@16 --help") yargs16(hideBin(process.argv)) .option("option1", { describe: "option1 description", type: "string", demandOption: true, }) .option("option2", { describe: "option2 description", type: "string", demandOption: true, }) .coerce("option2", () => undefined) .exitProcess(false) .parse(["--help"]) console.log("yargs@17 --help") yargs17(hideBin(process.argv)) .option("option1", { describe: "option1 description", type: "string", demandOption: true, }) .option("option2", { describe: "option2 description", type: "string", demandOption: true, }) .coerce("option2", () => undefined) .parse(["--help"])
Loading…

no comments

    sign in to comment