Testing
A Minekube game is easy to test because its rules import no Java. The same rules run on the server, in Bun under a test, and in the devtools. And every revision on the server records what happened as data, so a session someone played becomes a test.
| Level | Tool | Proves | Needs |
|---|---|---|---|
| Rules | Story, Story.explore |
What each message does to the Model and which Commands it issues, in every order up to a depth | Bun |
| Recorded sessions | Story.fromLog over recordings/*.ndjson |
A real session on the server still follows today’s rules | Bun |
| Bot clients | mk daemon, @minekube/client |
The whole game on a real server, from a real player’s view | The dev server, Java 25 |
| Play | mk dev . and the devtools |
How the game feels, with you in it | The dev server and Minecraft |
Run the first two with bun test. They take milliseconds, so run them on every save. The tests mk init creates in src/Round.test.ts cover both.
- Test rules with Stories
Test a Minekube game's rules in Bun with Effect UI Stories - send messages, check every Command they issue, and let Story.explore try every order of a set of messages.
- Recordings and replay
Every revision of a Minekube game records its message log on the server. Copy a session into your project, and bun test replays it through today's rules and names the first message that now behaves differently.
- Test with bot clients
Start real Minecraft clients that join your dev server, give them Effect bundles that play your game, and read both the client's and the server's recordings in an end-to-end test.
- The agent loop
How a coding agent builds a Minekube game end to end - it changes the rules, proves them in Bun, installs them on a live server, plays them with bot clients, and reads the message logs to find out why something happened.
- Devtools and message logs
Watch every message, Command and Model change of a Minekube game live in the Effect UI devtools, and let a coding agent read the same message logs through MCP.
Stories
Section titled “Stories”A Story starts a component, sends it messages and checks every Command it issues. Story.explore tries every order of a set of messages. See Test rules with Stories.
Recordings
Section titled “Recordings”Every revision on the server writes its message log to plugins/. See Recordings and replay.
Replays
Section titled “Replays”A recording copied into recordings/ replays through your current rules in bun test. See Recordings and replay.
mk dev . installs the game on the dev server, and the devtools show its session live while you play. A bot client plays it without you, and a coding agent can drive the whole loop.
Was this helpful?
Thanks for the feedback.