Description
Several test files in v4/classic still use deprecated or legacy forms of various functions (z.string().date() instead of z.iso.date(), z.number().safe() instead of z.int(), etc.).
Some of these are unrelated test cases that happen to use deprecated forms (like z.string().email() in a template literal test), which simply need to be migrated. Others are relevant functionality tests (like z.string.email() in an email validation test)--the tests are currently somewhat inconsistent about using current or deprecated versions, and this should be standardized.
Decisions to make
When testing functionality that has both current and deprecated versions, should we test just the new, just the old, or both?
Description
Several test files in v4/classic still use deprecated or legacy forms of various functions (
z.string().date()instead ofz.iso.date(),z.number().safe()instead ofz.int(), etc.).Some of these are unrelated test cases that happen to use deprecated forms (like
z.string().email()in a template literal test), which simply need to be migrated. Others are relevant functionality tests (likez.string.email()in an email validation test)--the tests are currently somewhat inconsistent about using current or deprecated versions, and this should be standardized.Decisions to make
When testing functionality that has both current and deprecated versions, should we test just the new, just the old, or both?