Fishery
github.com
What it is
Fishery is a free JavaScript library for preparing objects as test data and for other situations where JavaScript data needs setup. Its factories define defaults, and build() creates objects with supplied parameters layered over those defaults. TypeScript users can obtain typed factory parameters and return objects, while the library also works without TypeScript. Factories may define onCreate behavior for asynchronous work; create() then performs that work and returns a promise. Additional factory capabilities include sequences, transient parameters, associations, and hooks that run after building or creating objects. Developers can extend factories with reusable builder methods by subclassing Factory. The documentation describes using factories alongside other factories to build associated objects. Installation instructions cover npm and Yarn as development dependencies. The repository identifies Fishery as free software under the MIT license and says thoughtbot, inc. maintains and funds it. GitHub Issues is the listed channel for bug reports and change requests.
Spec sheet
- Purpose
- Fishery is a JavaScript library for setting up objects for tests and other data needs.Read 11 Oct 2026 · github.com
- Audience
- The README describes Fishery as useful for tests and other situations where JavaScript data needs to be set up.Read 4 Oct 2026 · github.com
- Security
- The repository lists a security policy resource, but the opened page did not provide policy details.Read 11 Oct 2026 · github.com
- License
- The README describes Fishery as free software and links to its license.Read 11 Oct 2026 · github.com
- Async creation
- Factories can use create() for asynchronous operations, with behavior configured through onCreate.Read 11 Oct 2026 · github.com
- Build objects
- Factories use build() to create objects, and passed parameters overlay the factory's default properties.Read 11 Oct 2026 · github.com
- Create objects
- Factories can define onCreate behavior so create() performs asynchronous work and returns a promise.Read 4 Oct 2026 · github.com
- Factory features
- The README documents sequences, transient parameters, associations, after-build hooks, and after-create hooks.Read 11 Oct 2026 · github.com
- Install
- The README gives npm install --save-dev fishery and yarn add --dev fishery as installation commands.Read 4 Oct 2026 · github.com
- Installation
- The README gives npm and Yarn commands for installing Fishery as a development dependency.Read 11 Oct 2026 · github.com
- Integration
- The README describes using factories alongside other factories to build associated objects.Read 11 Oct 2026 · github.com
- Intended use
- The README says Fishery can be used in tests and anywhere else data needs to be set up.Read 11 Oct 2026 · github.com
- License details
- The repository identifies its license as MIT.Read 11 Oct 2026 · github.com
- Maintainer
- The repository says it is maintained and funded by thoughtbot, inc.Read 11 Oct 2026 · github.com
- Reusable builders
- Factories can be extended with methods to create reusable builder patterns.Read 11 Oct 2026 · github.com
- Support channel
- The repository links to GitHub Issues for reporting bugs and requesting changes.Read 4 Oct 2026 · github.com
- TypeScript
- Factories accept typed parameters and return typed objects, and Fishery also works without TypeScript.Read 11 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Builds objects from reusable factory defaults
- Supports TypeScript and plain JavaScript
- Handles asynchronous creation with promises
- Includes sequences, associations, and hooks
- MIT-licensed free software
Limits
- Focused on JavaScript data setup
- Installation is documented as a development dependency
- Security policy details are not provided
Who it suits
Fishery suits JavaScript developers setting up test fixtures or other structured data, especially those using TypeScript, asynchronous creation, or related object factories.
Verdict
Fishery provides configurable factories for test data, including typed parameters, asynchronous creation, relationships, and lifecycle hooks. Its free MIT license and npm or Yarn installation make it suitable for development workflows requiring repeatable object setup.
Where Specifiction places it
- Test Data Generation Tools#11 of 287.7