mockStreamFields function test

Last updated: 2026-03-04T23:21:38.377Z

Metrics

LOC: 5 Complexity: 2 Params: 1

Signature

mockStreamFields(fields: FormField[]): : void

Summary

Helper: wraps an array of fields into an async generator for streamAllFields mock

Source Code

function mockStreamFields(fields: FormField[]): void {
  mockStreamAllFields.mockImplementation(async function* () {
    for (const f of fields) yield f;
  });
}

No outgoing dependencies.

Impact (Incoming)

graph LR mockStreamFields["mockStreamFields"] makeInput["makeInput"] makeInput -->|calls| mockStreamFields style mockStreamFields fill:#dbeafe,stroke:#2563eb,stroke-width:2px click mockStreamFields "7d0c8a72344a1e0a.html" click makeInput "3b463c3c3297bb7c.html"
SourceType
makeInput calls