Add unit tests for manual add project flow#618
Open
sharma1208 wants to merge 3 commits into
Open
Conversation
mattbsox
requested changes
Jul 2, 2026
mattbsox
left a comment
Member
There was a problem hiding this comment.
Small changes. Can maybe add copyrights to the test files too.
Member
There was a problem hiding this comment.
I think we can use the public versions of the new dependencies. I don't think we need to pull in from an internal registry.
| "test-maven": "npm run test-compile && extest setup-and-run -o .vscode/settings.json 'out/test/M*.js' --code_settings src/test/resources/settings.json", | ||
| "test-gradle": "npm run test-compile && extest setup-and-run -o .vscode/settings.json 'out/test/G*.js' --code_settings src/test/resources/settings.json" | ||
| "test-gradle": "npm run test-compile && extest setup-and-run -o .vscode/settings.json 'out/test/G*.js' --code_settings src/test/resources/settings.json", | ||
| "test:unit": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' node --require ts-node/register node_modules/.bin/mocha --config .mocharc.unit.yml" |
Member
There was a problem hiding this comment.
Nit-picky, maybe test-unit or unit-tests?
…ed to test-unit in package json
- Extracted shared fakeVscode.ts with installFakeVscode() - Remove TS_NODE_COMPILER_OPTIONS from test-unit script in package.json since tsconfig.json already specifies module: commonjs - Simplify addUserSelectedPath Test 1 — remove unnecessary existsSyncStub and readFileStub wrappers since createLibertyProject is fully replaced with a fake and no real file I/O occurs
mattbsox
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds unit test coverage for the manual add project flow in Liberty Tools. Adressing #617
Changes
added a unit test setup for running TypeScript-based unit tests with Mocha
added unit tests for addUserSelectedPath()
covered manual add success (0), duplicate (1), and invalid project (2) return cases
verified live dashboard map updates and workspace storage persistence behavior
added unit tests for addProjectsToTheDashBoard()
verified command-layer behavior for all manual add result codes, including expected message handling and dashboard refresh behavio