Closed amitguptagwl closed 6 years ago
Rewire still runs the file on require (like require). This means that the cli function executes twice. Once on initialisation (with process.argv
parameters) and once from your test script. Are you sure, you tested the second execution?
Hmm, It means I'll have to handle the first call in the way it doesn't impact another call.
Thanks for your quick suggestion.
I have created a node script file
Now I want to test it if works fine for provided arguments.
But it is executing
cli
function with actual arguments instead of the arguments I passed.