Noticed while adding a guard test in #3728.
packages/world/package.json defines build, dev and clean — but no test. The root test script is turbo test, which runs each package's own test script, so the 13 .test.ts files under packages/world/src/ have never run in CI.
Running them by hand:
$ npx vitest run --root packages/world
Test Files 1 failed | 12 passed (13)
Tests 1 failed | 152 passed (153)
The failure is real and pre-existing on main:
FAIL src/spec-version.test.ts > spec version constants > current spec version is the compression version
AssertionError: expected 6 to be 5
expect(SPEC_VERSION_CURRENT).toBe(SPEC_VERSION_SUPPORTS_COMPRESSION);
expect(SPEC_VERSION_SUPPORTS_COMPRESSION).toBe(5);
SPEC_VERSION_CURRENT moved to 6 and the assertion pinning it to the compression version was never updated — exactly the kind of thing the test existed to catch, and it went unnoticed because the suite is unwired.
Fix
- Add
"test": "vitest run src" to packages/world/package.json, matching the other packages.
- Update
src/spec-version.test.ts for the current spec version — worth a moment's thought rather than just re-pinning the number, since the assertion was encoding "current == compression version" as an invariant and that is no longer true.
- Confirm
turbo test picks the package up.
Small but load-bearing: @workflow/world is the contract package every world implementation is written against, so it is a bad one to have untested.
Noticed while adding a guard test in #3728.
packages/world/package.jsondefinesbuild,devandclean— but notest. The roottestscript isturbo test, which runs each package's owntestscript, so the 13.test.tsfiles underpackages/world/src/have never run in CI.Running them by hand:
The failure is real and pre-existing on
main:SPEC_VERSION_CURRENTmoved to 6 and the assertion pinning it to the compression version was never updated — exactly the kind of thing the test existed to catch, and it went unnoticed because the suite is unwired.Fix
"test": "vitest run src"topackages/world/package.json, matching the other packages.src/spec-version.test.tsfor the current spec version — worth a moment's thought rather than just re-pinning the number, since the assertion was encoding "current == compression version" as an invariant and that is no longer true.turbo testpicks the package up.Small but load-bearing:
@workflow/worldis the contract package every world implementation is written against, so it is a bad one to have untested.