Birthdate with default values return age less than 18 #2534
Labels
c: bug
Something isn't working
m: date
Something is referring to the date module
p: 1-normal
Nothing urgent
s: accepted
Accepted feature / Confirmed bug
Milestone
Pre-Checks
Describe the bug
I was running into flaky tests in my application, and narrowed it down to faker's
date.birthdate
method.According to the docs:
But there are times that an age less than 18 years old is generated. This does not happen every time, but I was able to get a specific seed and refDate to reproduce the issue.
Minimal reproduction code
https://stackblitz.com/edit/vitest-dev-vitest-md9oj6?file=test%2Fsuite.test.ts
Additional Context
No response
Environment Info
Which module system do you use?
Used Package Manager
npm
The text was updated successfully, but these errors were encountered: