-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Milestone
Description
clean() currently has no dedicated tests, which allowed #249 to go undetected.
The function handles several distinct code paths that should be tested:
- Country name normalisation - 2-letter ISO, 3-letter ISO, and full country names
- Non-numeric age entries - entries without numbers should become NA
- "Under X" format - e.g., "Under 1" → "0-1"
- Age unit conversion - months/weeks to years
- Age range parsing - "20-30" → part_age_est_min = 20, part_age_est_max = 30
- Exact age column creation - part_age_exact from numeric ages
A regression test for (5) should be added to #250, but more comprehensive coverage would help prevent future regressions.
Reactions are currently unavailable