Skip to content

tests/workers/coordinator.test.ts has never been able to run #135

Description

@chitcommit

tests/workers/coordinator.test.ts imports cloudflare:test, which is only resolvable under @cloudflare/vitest-pool-workers. Two things prevent it from ever executing:

  1. The package is declared but not installed. package.json:37 lists "@cloudflare/vitest-pool-workers": "^0.20.1", but it is absent from node_modules/@cloudflare/ (which holds only ai-chat, kv-asset-handler, unenv-preset, workerd-linux-arm64, workers-types).
  2. The workers pool is never configured. vitest.config.ts:10 sets pool: 'threads'. Even with the package installed, cloudflare:test would not resolve under the threads pool.

Impact

Surfaces as 1 failing test file plus 4 tsc --noEmit errors. The file tests the CommandCoordinator Durable Object — real DO storage, real workerd, no mocks — so the coverage it is meant to provide is real and currently absent. This is a silent gap: the suite reports 68 passed / 39 skipped and the missing DO coverage is not visible in that number.

Fix — pick one

  • Make it run: install the package, add a second Vitest project using defineWorkersConfig with the COMMAND_COORDINATOR binding, keep the existing threads project for the node-side specs.
  • Or delete it and drop the unused dependency, if DO-level coverage is not wanted.

Leaving it in place is the one option that costs tsc noise and buys nothing.

Out of scope

Untouched by #133, which changed only the test database wiring.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XR1DmmrKouFMQPL9rwhv18

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions