API Core - v1.5.0
    Preparing search index...

    Function mockTemporalNowInstant

    • Routes Temporal.Now.instant() through the mocked Date.now(). temporal-polyfill v1 delegates to the native Temporal when the runtime ships one (Node 26+), and native Temporal.Now reads the real clock directly, bypassing vi.setSystemTime (which only patches Date) — so a test that freezes or advances time must also route the instant through the mocked clock. Under the polyfilled implementation the spy is a behavioral no-op. Restore it with vi.mocked(Temporal.Now.instant).mockRestore() next to vi.useRealTimers().

      Returns void