We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
versions used:
"@anatine/zod-mock": "3.13.4" "zod": "3.23.4" "@faker-js/faker": "8.4.1"
I have an error sometimes error with this example:
./test.ts:
import { generateMock } from '@anatine/zod-mock'; import z from 'zod'; const testSchema = z.object({ passwordHash: z.string().min(8) }); const fakeData = generateMock(testSchema); console.log(fakeData);
shell outputs:
❯ npx ts-node ./test.ts { passwordHash: 'crepusculum' } ❯ npx ts-node ./src/test.ts RangeError: Invalid array length at Function.from (<anonymous>) at ee.multiple (/test/node_modules/@faker-js/faker/dist/cjs/modules/helpers/index.js:1:8233) at A.fromCharacters (/test/node_modules/@faker-js/faker/dist/cjs/modules/string/index.js:1:929) at A.alpha (/test/node_modules/@faker-js/faker/dist/cjs/modules/string/index.js:1:1361) at Object.parseString [as ZodString] (/test/packages/zod-mock/src/lib/zod-mock.ts:260:38) at generateMock (/test/packages/zod-mock/src/lib/zod-mock.ts:603:33) at /test/packages/zod-mock/src/lib/zod-mock.ts:27:14 at Array.reduce (<anonymous>) at Object.parseObject [as ZodObject] (/test/packages/zod-mock/src/lib/zod-mock.ts:24:36) at generateMock (/test/packages/zod-mock/src/lib/zod-mock.ts:603:33) { passwordHash: undefined }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
versions used:
I have an error sometimes error with this example:
./test.ts:
shell outputs:
The text was updated successfully, but these errors were encountered: