You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The newly implemented validateDateRange function in src/device-registry/validators/activities.validators.js lacks test coverage. This function is critical as it validates that activity dates are not in the future and not more than one month in the past.
Requirements
Please add unit tests that verify:
A date in the future correctly triggers an error.
A date more than one month in the past correctly triggers an error.
A valid date within the acceptable range returns true.
Description
The newly implemented
validateDateRange
function insrc/device-registry/validators/activities.validators.js
lacks test coverage. This function is critical as it validates that activity dates are not in the future and not more than one month in the past.Requirements
Please add unit tests that verify:
true
.Context
Importance
Adding these tests will help ensure robust edge-case handling and maintain code quality as the application evolves.
Acceptance Criteria
validateDateRange
functionThe text was updated successfully, but these errors were encountered: