TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Generate realistic-looking fake data for your Prisma models

2 点作者 luisrudge大约 2 年前
At work, we&#x27;re migrating from Mongoose to Prisma + PostgreSQL. When we started migrating the integration tests, I noticed that we were spending a lot of time creating fake objects to populate the database before the tests. Previously, our factory methods were all untyped (they were created before our migration to TS), so it was hard to make them work with Prisma. Also, every time we add or remove a field, the factories would break. That&#x27;s when I decided to investigate if there was a better way.<p>`prisma-generator-fake-data` allows you to easily generate realistic fake data that you can use for testing, prototyping, or anything in between. If you&#x27;re using JSON fields in Prisma, it allows you to provide your own fake data generator function.<p>Let me know what you think!

暂无评论

暂无评论