TR-1: Implement Unit Testing: Convert-HawkDaysToDate.Tests.ps1 #251
Labels
status/backlog
In backlog / validated
type/feature
New feature or request
type/gaant
Used for Gaant Visualization
Milestone
Description:
The
Convert-HawkDaysToDate
function is a critical internal helper function in the Hawk module that converts a "days to look back" value into proper UTC StartDate and EndDate values for investigation timeframes. This function ensures consistent date handling across the module and validates that the specified date range doesn't exceed 365 days.Requirements:
Convert-HawkDaysToDate.Tests.ps1
.Hawk/tests/functions/
.Test Cases Should Cover:
Valid input scenarios:
Output validation:
StartDate
is the correct number of days in the past.EndDate
is set to midnight of the next day (UTC).Test Execution:
Your tests will be automatically discovered and executed by the module's test runner in
Hawk/tests/pester.ps1
. This script is called during module validation throughvsts-validate.ps1
.To manually run your tests during development:
The text was updated successfully, but these errors were encountered: