I am trying to get command line argument values using NPM package "yargs" instead of retrieving the values from config.ts file.
Example: My config.ts file looks like
export const config: Config = {
username: process.argv[3],
password: process.argv[4]
}
And in my package.json file I already defined my scripts for "test": "./node_modules/.bin/protractor typeScript/config/config.js",
In my testcase i am retrieving values as "config.username" & "config.password"
So when i execute npm test --username1 --password1 , my testcase which is executing is picking values from config.ts file and not the values which i passed "username1" and "password1" from command line. Can someone please help me in picking the values from command line and not from the config.ts file.
Thanks in advance.. !!!