makeSession function test

Last updated: 2026-03-05T10:53:28.857Z

Metrics

LOC: 22 Complexity: 2 Params: 3

Signature

makeSession( overrides: Partial<RecordingSession> = {}, steps?: RecordedStep[], ): : RecordingSession

Source Code

function makeSession(
  overrides: Partial<RecordingSession> = {},
  steps?: RecordedStep[],
): RecordingSession {
  return {
    steps: steps ?? [
      { type: "navigate", url: "https://example.com", timestamp: 1000 },
      {
        type: "fill",
        selector: "#name",
        value: "John",
        fieldType: "full-name",
        timestamp: 2000,
      },
      { type: "click", selector: "#submit", timestamp: 3000 },
    ],
    startUrl: "https://example.com",
    startTime: 1000,
    status: "stopped",
    ...overrides,
  };
}

Dependencies (Outgoing)

graph LR makeSession["makeSession"] convertRecordingToFlow["convertRecordingToFlow"] convertSteps["convertSteps"] _resetIdCounter["_resetIdCounter"] RecordedStep["RecordedStep"] RecordingSession["RecordingSession"] makeStep["makeStep"] makeSession -->|uses| convertRecordingToFlow makeSession -->|uses| convertSteps makeSession -->|uses| _resetIdCounter makeSession -->|uses| RecordedStep makeSession -->|uses| RecordingSession makeSession -->|calls| makeSession makeSession -->|calls| makeStep style makeSession fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makeSession "5a9b47b0cc679d94.html" click convertRecordingToFlow "757a5ffbc62eadcc.html" click convertSteps "9420198414a645f6.html" click _resetIdCounter "66adb029029661b7.html" click RecordedStep "62534895a8071c82.html" click RecordingSession "fe9e6db030d6d1f2.html" click makeStep "b18b119459590162.html"

Impact (Incoming)

graph LR makeSession["makeSession"] makeSession -->|calls| makeSession style makeSession fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makeSession "5a9b47b0cc679d94.html"
SourceType
makeSession calls