pkgjs / parseargs

Polyfill of `util.parseArgs()`
Apache License 2.0
121 stars 9 forks source link

test: refactor test/index.js to match Node #110

Closed bcoe closed 2 years ago

bcoe commented 2 years ago

tldr; make it so we can drop test/index.js into test/parallel/test-parse-args.mjs.


Refactors index.js to be able to copy paste directly into the Node.js codebase. Note: I think it is sufficient that we continue syncing just the tests for parseArgs() to Node.js (testing the public API. This gives us 95% coverage today, and it would be easy to push this to 100% with a couple additional tests.

Fixes #105

shadowspawn commented 2 years ago

Note: I think it is sufficient that we continue syncing just the tests for parseArgs() to Node.js (testing the public API.

I am comfortable with that. 👍