Skip to content

💥 Stabilize Node runtime test flake in config-api CF7 #371

Description

@taras

Symptom

deno task test:node can fail packages/core/tests/config-api.test.ts even though all seven CF assertions pass.

Observed on 2026-08-07 while validating issue #305:

  • Node runtime corpus: 2,423 passed, 1 failed
  • Failing file: packages/core/tests/config-api.test.ts
  • Failing test: CF7: an explicit fetch timeout is used without consulting the contextual value

The isolated test reports:

Test "CF7: an explicit fetch timeout is used without consulting the contextual value"
generated asynchronous activity after the test ended.
This activity created the error
"TypeError: Cannot read properties of undefined (reading 'error')"
and would have caused the test to fail, but instead triggered an uncaughtException event.

All CF1–CF7 assertions themselves pass; the failure is post-test asynchronous activity.

Reproduction

deno task test:node

Isolated:

node_modules/.bin/tsx --tsconfig tsconfig.node.json --test packages/core/tests/config-api.test.ts

Expected behavior

The explicit-timeout fetch test settles all fetch/Effection/Node test-adapter activity before the test scope closes, so the Node runtime suite exits successfully without an uncaught post-test exception.

Investigation notes

The failure appears independent of the props namespace work in #305. The likely boundary is cleanup or late error reporting around the explicit fetch("data:text/plain,hello", { timeout: 5_000 }) operation under the Node test adapter. The fix should make the operation and its teardown settle deterministically rather than weakening the assertion or suppressing uncaught exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingflakeIntermittent or timing-sensitive failure that can pass without a code change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions