Skip to content

@workflow/world has 13 test files and no test script, so none of them run in CI #3731

Description

@pranaygp

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

  1. Add "test": "vitest run src" to packages/world/package.json, matching the other packages.
  2. 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.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions