Skip to content

A little mimic. A lot of possibility.

Test data,
with character.

Typed fixtures. Coherent scenarios. Failures you can replay.

Give your tests a little life. Build fixtures that fit your schemas, keep related data connected, and bring a failing case back on cue.

Published beta · 0.1.0-beta.8
Available on npm’s latest tag.

Mimlet, a mint folded-corner creature with little feet
your-next-test.tsTS
ts
import Type from 'typebox';
import { fluent } from '@mimlet/core';
import { fromTypeBox } from '@mimlet/typebox';

const User = Type.Object({
  id: Type.String({ default: 'user-1' }),
  role: Type.Union([
    Type.Literal('reader'),
    Type.Literal('admin'),
  ]),
});

const users = fluent(fromTypeBox(User), ['id', 'role']);
export const admin = users.withRole('admin').buildValidated();
{ id: 'user-1', role: 'admin' }validated

See it catch a bug

Two units. Charged for one.

A checkout test passes with one item, but the code forgets to multiply by quantity. Generated orders find the bug, shrink it to 2 units at 1¢ charged as 1¢, replay it from a saved record, and keep it as a regression test.

fast-check generates and shrinks the orders. A Mimlet scenario rebuilds the linked customer, order and lines for every candidate, and a replay record checked against the same versions and configuration brings the failure back.

46 seconds · on-screen captions · sound cues only, starts muted · Open the MP4 (2.2 MB)

Quickstart with Zod

  1. Install the beta
    npm install --save-dev @mimlet/zod@0.1.0-beta.8 zod@4.6.5
  2. Save as fixture.mts
    ts
    import { z } from 'zod';
    import { fromZod } from '@mimlet/zod';
    
    const User = z.object({
      name: z.string(),
      age: z.string().transform(Number),
    });
    
    const users = fromZod(User).with({ name: 'Ada', age: '42' });
    export const input = users.build(); // age: string
    export const user = users.buildValidated(); // age: number
  3. Add console.log(input, user), then run on Node 22.18+
    node fixture.mts
    { name: 'Ada', age: '42' } { name: 'Ada', age: 42 }

Beta 0.1.0-beta.8 on npm’s latest tag. APIs can still change before a stable release, and there is no production adoption to point to yet.

At home with your schemas
  • TypeBox
  • Zod
  • Valibot
  • ArkType
  • Effect
  • JSON Schema
See each integration’s capabilities

Small fixtures. Bigger stories.

Make the data part
the easy part.

From one object to a whole test world, keep the pieces you care about under your control.

01 /

Your schema. Its natural habitat.

Keep your native types, validation and codecs. Start with a supported generator, or bring a factory for the details only you know.

Find your adapter
02 /

A whole world, connected.

A customer, their order, the right total. Describe the relationships once, then build a coherent scenario for the test in front of you.

Build a scenario
03 /

That failure? Bring it back.

When a generated test fails, shrink it to the smallest failing case and save it. Replaying the record brings back the same failure, relationships intact.

Meet replay and shrinking

Bring just what you need

A small core.
Room to grow.

The builder core has no runtime dependencies. Add generation, protocols, property testing, or a local playground when the job calls for them.

@mimlet/core the core@mimlet/typebox@mimlet/zod@mimlet/arktype@mimlet/fast-check@mimlet/graphql@mimlet/codegenhey-api-buildersExplore all 19 packages

For coding agents, too

Good context.
Better fixtures.

Give your coding agent a clear starting point: real APIs, working recipes, and the boundaries that matter.

Open the agent guide

Less API guesswork

Typed builders and tested recipes make the intended operations explicit.

More repeatable debugging

Save a compatible replay record and return to the failing case.

A clear path through the docs

Read concise Markdown, choose an adapter, and know when to use a factory.

Read llms.txt
Give your next test some character.

Mimlet · MIT licensed · Made by Jeffrey Nijs

Get started

Mimlet · beta · MIT licensed