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
Zod is a library for validating and parsing data. numericIdZodType is a utility we use to validate and parse numeric IDs, it accepts positive integers or the string representation of a positive integer.
This issue involves adding a file workspaces/util/src/__tests__/numericIdZodType-test.ts, for testing the numericIdZodType utility. Specifically, we care about testing the parse function, so stuff like:
expect(numericIdZodType.parse(123)).toBe(123);expect(()=>numericIdZodType.parse(-123)).toThrow(/* some error */);
To see some PRs that add tests, take a look at #288 and #290 for inspiration.
The text was updated successfully, but these errors were encountered:
Zod is a library for validating and parsing data.
numericIdZodType
is a utility we use to validate and parse numeric IDs, it accepts positive integers or the string representation of a positive integer.This issue involves adding a file
workspaces/util/src/__tests__/numericIdZodType-test.ts
, for testing thenumericIdZodType
utility. Specifically, we care about testing theparse
function, so stuff like:To see some PRs that add tests, take a look at #288 and #290 for inspiration.
The text was updated successfully, but these errors were encountered: