allenhwkim / ngentest

Angular6+ Unit Test Generator For Components, Directive, Services, and Pipes
https://ngentest.github.io
MIT License
144 stars 60 forks source link

Type error on get command help #44

Closed danielberebel closed 3 years ago

danielberebel commented 3 years ago

I has received error when trying to get command help to list available params:

$ ngentest --help

/Users/dani/.nvm/versions/node/v10.22.0/lib/node_modules/ngentest/index.js:43
const tsFile = argv._[0].replace(/\.spec\.ts$/, '.ts');
                         ^

TypeError: Cannot read property 'replace' of undefined
    at Object.<anonymous> (/Users/dani/.nvm/versions/node/v10.22.0/lib/node_modules/ngentest/index.js:43:26)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
allenhwkim commented 3 years ago

Please use this command $ ngentest -h