testing/cross_backend/wire_shapes.ts

Wire-shape assertions shared by the cross-backend suites.

A field can carry the right value on both backends and still be a parity defect if the two serialize it differently — a millisecond 2026-05-17T12:34:56.789Z and a second-precision 2026-05-17T12:34:56Z both parse as the same instant, so a Zod z.string() check and an assert.ok(value) pass on either. These helpers pin the bytes.

view source

Declarations
#

2 declarations

assert_iso8601_seconds
#

testing/cross_backend/wire_shapes.ts view source

(value: unknown, label: string): void import {assert_iso8601_seconds} from '@fuzdev/fuz_app/testing/cross_backend/wire_shapes.js';

Assert value is a timestamp in the spine's canonical wire shape: second-precision UTC, exactly 20 characters. The TS spine emits it from the iso8601_timestamp_column SQL projection (db/sql_columns.ts) and to_iso8601_seconds (timestamp.ts); the Rust spine from fuz_db::iso8601_timestamp_column and fuz_sys::rfc3339_now.

value

the field read off a wire response

type unknown

label

the field's name, for the failure message

type string

returns

void

assert_iso8601_seconds_nullable
#

testing/cross_backend/wire_shapes.ts view source

(value: unknown, label: string): void import {assert_iso8601_seconds_nullable} from '@fuzdev/fuz_app/testing/cross_backend/wire_shapes.js';

Assert value is either null or a canonical second-precision UTC timestamp — the shape of every nullable timestamp on the wire (expires_at, deleted_at, updated_at, …).

value

the field read off a wire response

type unknown

label

the field's name, for the failure message

type string

returns

void

Depends on
#

Imported by
#