DavidTimms / DavidTimms/zod-fast-check
ZodFastCheck().outputOf(z.record(z.number(), z.number())) only builds empty records
- Dominant language
- TypeScript
- Stars
- 130
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
This test passes:
```
it('only builds empty records', () => {
fc.assert(
fc.property(
ZodFastCheck().outputOf(z.record(z.number(), z.number())),
(xs) => {
assert(Object.keys(xs).length === 0);
},
),
);
});
```
But it would be great if it failed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the shown test for ZodFastCheck().outputOf(z.record(z.number(), z.number())). Trace the record-schema handling from that entry point and identify why generated objects are always empty. Done means the property no longer passes because generated records can contain entries while still satisfying the schema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100