-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(project): enhance project update management and testing #178
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
Conversation
… code in Test_FindProject_SUCCESS function
…Call_GetProject_700 in test files
…Run_BeforeEach to set standar mock arange
| @@ -0,0 +1,48 @@ | |||
| function Update-ProjectRecent{ | |||
Check warning
Code scanning / PSScriptAnalyzer
Function 'Update-ProjectRecent' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| return $ret | ||
| } Export-ModuleMember -Function Update-ProjectRecent | ||
|
|
||
| function Set-EnvItem_Last_RecentUpdate_Today{ |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Set-EnvItem_Last_RecentUpdate_Today' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| Invoke-TestingHelper -ShowTestErrors:$ShowTestErrors | ||
| } | ||
| # Resolve scoped tests | ||
| $TestName = [string]::IsNullOrWhiteSpace($TestName) ? $global:TestNameVar : $TestName |
Check warning
Code scanning / PSScriptAnalyzer
Found global variable 'global:TestNameVar'. Warning test
| @@ -0,0 +1,28 @@ | |||
| # Run Before and After any test | |||
| # | |||
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
|
||
| function Test_UpdateProjectRecent_UpdateBasedOn_SetRecentUpdate{ | ||
| # Arrange | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
|
||
| # Cache project | ||
| MockCall_GetProject_700 -Cache | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| @@ -0,0 +1,48 @@ | |||
| function Update-ProjectRecent{ | |||
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Update-ProjectRecent' does not have a help comment. Note
Introduce the
Update-ProjectRecentfunction to improve recent project updates handling. Refactor test cases to streamline mock handling and remove redundant code. Add new functions for better test management and ensure accurate date retrieval withMock_Today. This update also includes unit tests for the new functionality.feat(project): add Update-ProjectRecent function to manage recent project updates
refactor(test): update global variable handling for TestName
feat(mock): add Mock_Today function to retrieve today's date
fix(test): comment out Enable-InvokeCommandAliasModule in Test_FindProject_SUCCESS
feat(includeFiles): add functions to run before and after tests
fix(project): correct query assignment in Update-ProjectRecent function
fix(test): remove commented Enable-InvokeCommandAliasModule commented code in Test_FindProject_SUCCESS function
fix(mock): update date values in Get-Mock_Today function
test(project): add unit tests for Update-ProjectRecent functionality
refactor(test): replace MockCall_GitHubOrgProjectWithFields with MockCall_GetProject_700 in test files
feat(test): add Reset_Test_Mock function and integrate it in Run_BeforeEach
refactor(copilot): streamline Arrange phase in Test_AddProjectUser functions
refactor(test): remove redundant mock resets from test cases and use Run_BeforeEach to set standard mock arrange