MCPcopy Create free account
hub / github.com/Noumena-Network/code / runTransitionWithLog

Function runTransitionWithLog

src/ink/logUpdateFlickerRegression.test.ts:225–241  ·  view source on GitHub ↗
(
  log: LogUpdate,
  prev: Frame,
  next: Frame,
  skipSyncMarkers = true,
)

Source from the content-addressed store, hash-verified

223}
224
225function runTransitionWithLog(
226 log: LogUpdate,
227 prev: Frame,
228 next: Frame,
229 skipSyncMarkers = true,
230): {
231 diff: Diff
232 written: string
233 clearPatch: Extract<Diff[number], { type: 'clearTerminal' }> | undefined
234} {
235 const { diff } = log.render(prev, next)
236 return {
237 diff,
238 written: serializeDiff(diff, skipSyncMarkers),
239 clearPatch: findClearTerminalPatch(diff),
240 }
241}
242
243describe('LogUpdate flicker regressions', () => {
244 it('returns the physical frame for ordinary incremental renders', () => {

Calls 3

findClearTerminalPatchFunction · 0.85
serializeDiffFunction · 0.70
renderMethod · 0.45

Tested by

no test coverage detected