Skip to content

chore: export toSqliteDateTime() for direct unit testing #637

Description

@BreakableHoodie

toSqliteDateTime() in functions/utils/authAttempts.js is a private (unexported) helper — the invariant test added in the golden-snapshot PR has to reach it indirectly through checkAuthRateLimit's windowStart binding. That test is faithful (exercises the real code path), but a direct unit test would be cleaner and the helper is documented in CLAUDE.md as the canonical normalizer for the SEC-F1 datetime bug class, so it's worth exposing. Add export to the function and give it a direct toSqliteDateTime unit test (format assertion + a T-separator negative case). Trivial, low-risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance, tooling, repo hygienepriority:p3Lower priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions