Skip to content

Consolidate createFakeBackend factories into a shared test helper #81

@ThomasK33

Description

@ThomasK33

Spun off from #78 review (DEREM-11).

Context

There are now four hand-rolled createFakeBackend() factories implementing
RendererBackend across the test suite:

Each copy hand-writes the same replayTo/snapshot/getVisibleText/
dispose stubs. The screenshot copy is currently the most flexible and is
a good basis for consolidation.

Acceptance ideas

  • Introduce test/helpers/fakeBackend.ts exporting createFakeBackend(...)
    with the union of capabilities the existing copies need (configurable
    return values, optional callbacks, optional renderer-failure injection).
  • Migrate all four call sites to the shared helper.
  • Keep test names and behaviour unchanged.

Out of scope here

  • Renderer behaviour or production code changes.

Filed automatically as part of the #78 review cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvementready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions