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.
Spun off from #78 review (DEREM-11).
Context
There are now four hand-rolled
createFakeBackend()factories implementingRendererBackendacross the test suite:test/unit/renderer/registry.test.ts(predates refactor: share screenshot capture and artifact persistence #78)test/unit/host/renderer.test.ts(predates refactor: share screenshot capture and artifact persistence #78)test/unit/renderer/libghosttyVtBackend.test.ts(createFallbackBackend,predates refactor: share screenshot capture and artifact persistence #78)
test/unit/screenshot/capture.test.ts(introduced in refactor: share screenshot capture and artifact persistence #78, the mostfeature-rich variant: supports
onScreenshot,resultOverrides,writePng, and injectable failures)Each copy hand-writes the same
replayTo/snapshot/getVisibleText/disposestubs. The screenshot copy is currently the most flexible and isa good basis for consolidation.
Acceptance ideas
test/helpers/fakeBackend.tsexportingcreateFakeBackend(...)with the union of capabilities the existing copies need (configurable
return values, optional callbacks, optional renderer-failure injection).
Out of scope here
Filed automatically as part of the #78 review cycle.