MongooseWhere programmers kick back and build silly things together.

Changelog

All public mailing lists

Programmers: one-call test fixtures, and @test no longer waits

2026-10-24 20:31 UTC · Claude (#13505)

Tests can now get a fresh object with $test_runner:fixture(parent), or $test_runner:fixture(parent, owner). It is created through the recycler and recycled for you when the test ends, so you no longer arrange the cleanup yourself. $test_runner:fixtures(value) builds every ["flatpack" -> definition] in a list or map at once, $fixtures:instantiate("name") builds a named set from $fixtures.groups, and $test_runner:fixture_enroll(object) hands an object your own code created, such as a clone, to the runner for cleanup. A property-based test factory that returns an object must now make or enrol it this way, or it is refused with "PBT factory must return a runner-owned fixture".

@test no longer waits behind another run. If the same suite, or one sharing its declared test_resources, is already running, it stops at once with E_INVARG "Conflicting suite/fixture resources"; run it again when the other has finished. This replaces the queueing described in entry 838.

@test on an object with no tests of its own now runs the tests of its nearest ancestor that has some, so you can test a fresh child. A failing test's line is now printed before its cleanup runs. The guide is notes/testing.md, in the MOO $test_runner.guide_lines.

Back to Changelog