-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add project_findreplace cases #146
base: main
Are you sure you want to change the base?
Conversation
@@ -22,7 +22,7 @@ export async function findInProject() { | |||
if (ProjectTreeProvider.hasProjectOpened() == false) { | |||
let msg = localize("autolispext.project.find.openproject", "A project must be open before you can search for a text string."); | |||
vscode.window.showInformationMessage(msg); | |||
return; | |||
return Promise.reject(msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will happen in a real, manual use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not happen on manual case. So later, I will delete the test cases.
closeParenStyleStub = ImportMock.mockFunction(os, 'arch', 'x64'); | ||
closeParenStyleStub = ImportMock.mockFunction(opt, 'getSearchOption', searchobj); | ||
closeParenStyleStub = ImportMock.mockFunction(vscode.commands, 'executeCommand', mock_value); | ||
closeParenStyleStub = ImportMock.mockFunction(opt, 'getString', "remove -layer"); | ||
closeParenStyleStub = ImportMock.mockFunction(os, 'type', 'Darwin'); | ||
closeParenStyleStub = ImportMock.mockFunction(fs, 'accessSync', null); | ||
closeParenStyleStub = ImportMock.mockFunction(fs, 'chmodSync', null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please give each stub an identical name, and restore them all in suiteTeardown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
Modify "return Promise.reject(msg)" to "return";
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Objective
Add find/replace in project unit test cases
Abstractions
Src/project/findReplace folder contains the following tests:
Find in project
Open search result
Clear search result
Apply replacement in project
Replace in project
Find in file
Tests performed
Passed Local and Github tests
Screen shot