InfoSec812 / npm-audit-ci-wrapper

A wrapper for 'npm audit' which can be configurable for use in a CI/CD tool like Jenkins
Apache License 2.0
13 stars 11 forks source link

Issue 16: Add unit tests #17

Closed InfoSec812 closed 5 years ago

InfoSec812 commented 5 years ago

Resolved #16

The code has been extensively refactored to enable unit testing.

I would greatly appreciated some testing and review of the changes!!

@tommybananas @dwinchell @TazSp

InfoSec812 commented 5 years ago

For some reason, whenever --ignore-dev-dependencies is passed, I see JSON output. I cannot seem to trace the cause. WEIRD!

InfoSec812 commented 5 years ago

Aha!!! Found and fixed the problem. It was an issue with function arity and I was passing too many arguments in some places.

InfoSec812 commented 5 years ago

For anyone interested in testing this new version before it's published to NPM:

These command MAY require sudo

npm uninstall -g npm-audit-ci-wrapper
npm install -g git+https://github.com/InfoSec812/npm-audit-ci-wrapper.git#Issue_16_-_Add_unit_tests
dwinchell commented 5 years ago

Very nice. The tests pass for me and this branch finds the same results on my project as the master branch.

Looks good to me.