Skip to content

refactor: split parsers.test.ts into dedicated files (#317)#592

Open
goureeshreddy7 wants to merge 1 commit into
OWASP:mainfrom
goureeshreddy7:refactor-parsers-test
Open

refactor: split parsers.test.ts into dedicated files (#317)#592
goureeshreddy7 wants to merge 1 commit into
OWASP:mainfrom
goureeshreddy7:refactor-parsers-test

Conversation

@goureeshreddy7

Copy link
Copy Markdown

Hey @sonukapoor! I wanted to help out with issue #317.

I went ahead and split the massive "parsers.test.ts" file into the 7 dedicated files you mentioned under a new "tests/parsers/" folder. I also deleted the old file to clean it up.

I ran "npm test" locally on my machine and all tests are passing perfectly without any issues. Let me know if everything looks good or if I need to change anything! Thank you !

Closes #317

@sonukapoor

Copy link
Copy Markdown
Collaborator

Thanks @goureeshreddy7 for the contribution. I will take a look this week.

@sonukapoor

Copy link
Copy Markdown
Collaborator

Thanks for tackling this - the split structure looks clean and the test organization makes sense. A few things to sort before merge:

package-lock.json change - please revert this, it's a local artifact that shouldn't be in this PR.

src/cli/args.ts change - the error message improvement (run cve-lite --help to see supported options) is actually useful, but it's unrelated to the test split. Happy to take it, but please open a separate small PR for it so it's tracked independently.

Rebase needed - the branch is behind main. After rebasing you'll need to handle a conflict: tests/parsers.test.ts was modified on main (a resolvedUrl test was added around line 172). That test belongs in tests/parsers/npm-lock.test.ts in your split - please make sure it's there when you rebase.

Once those three are resolved this is ready.

@goureeshreddy7 goureeshreddy7 force-pushed the refactor-parsers-test branch from f34b4bf to dd201f3 Compare June 9, 2026 16:10
@goureeshreddy7

goureeshreddy7 commented Jun 9, 2026

Copy link
Copy Markdown
Author

Thanks for the review, @sonukapoor sir !

I completely agree about args.ts— I will now open a separate small PR for the "help" suggestion.

I have reverted the accidental inclusions (package-lock.json and args.ts) and fully rebased the branch onto main. The -----resolvedUrl-- test has been successfully integrated into tests/parsers/npm-lock.test.ts.

The branch is totally clean and ready to go now! Let me know if you need anything that i need do for this .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: split parsers.test.ts into one test file per package manager

2 participants