CheckOps
Fishery
Fishery is an MIT-licensed TypeScript-first library from thoughtbot for defining factories that build JavaScript objects for tests, modelled on Ruby's factory_bot.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
Fishery is a library for setting up JavaScript objects for tests and anywhere else you need data. It is loosely modelled on Ruby’s factory_bot and built with TypeScript in mind: factories accept typed parameters and return typed objects, so test data stays valid, according to its README.
A factory is a function that returns an object. Fishery passes helpers such as a sequence number, params, associations and transient parameters. Factories can be extended, combined with traits-like methods, build lists with buildList, and run onCreate hooks for persistence. It pairs naturally with Faker for realistic values.
Release v2.4.0 shipped in December 2025.
In the quality loop it supports unit and integration tests in JavaScript.
The source code is at thoughtbot/fishery on GitHub under the MIT licence, with about 1,000 stars; the most recent commit was on 8 December 2025.
Features
- Typed factories: TypeScript-first.
- Sequences: Unique values.
- Associations: Build related objects.
- buildList: Many objects at once.
- onCreate hooks: Persist objects.
Pros
- Clean API: Familiar to factory_bot users.
- Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 8 December 2025.
Cons
- Slower release cadence: Last release December 2025.
Usage and Links (Example)
import { Factory } from 'fishery';
const userFactory = Factory.define<User>(({ sequence }) => ({ id: sequence, name: 'Ada' }));
const users = userFactory.buildList(3);
Resources:
Pricing
Fishery is free and open source under the MIT licence.
Recommended for?
- TypeScript teams wanting typed factories.
- Not a fit without TypeScript benefits in mind.
Conclusion
Fishery is a tidy, typed factory library for JavaScript tests.
On CheckOps, Fishery is filed under the Unit testing stage. Related tools listed here include factory_bot, Faker (JavaScript), Polyfactory, Model Bakery, factory_boy and AutoFixture. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with Fishery side by side.
Ffactory_botfactory_bot is thoughtbot's MIT-licensed Ruby library for setting up test data with factories, sequences, traits and associations, used with RSpec, Minitest and Rails via factory_bot_rails.Compare with Fishery
FFaker (JavaScript)Faker is an MIT-licensed JavaScript and TypeScript library that generates large amounts of fake but realistic data, such as people, addresses, dates, finance and commerce values, in over 70 locales, in Node.js and browsers.Compare with Fishery
PPolyfactoryPolyfactory is an MIT-licensed Python library from the Litestar organisation that builds mock data factories from type hints for dataclasses, Pydantic, attrs, TypedDict, msgspec and ORM models.Compare with Fishery
MModel BakeryModel Bakery is an Apache-2.0 library that creates Django model instances for tests with one line, filling required fields automatically, including related objects.Compare with Fishery
Ffactory_boyfactory_boy is an MIT-licensed test fixtures replacement for Python, inspired by thoughtbot's factory_bot, that builds test objects and ORM records for Django, SQLAlchemy and MongoEngine with Faker integration.Compare with Fishery
AAutoFixtureAutoFixture is an MIT-licensed .NET library that minimises the Arrange phase of unit tests by automatically creating anonymous test data and object graphs, with integrations for xUnit, NUnit and mocking libraries.Compare with Fishery