Functions
@system-inc/base-foundation · 515c140 · 3 symbols
parseSetCookie
Parses a Set-Cookie header into a map of cookie names to values.
Accepts an optional type argument so call sites with a known cookie shape can narrow the result:
setIntegrationTestEnvironment
To be used ONLY by jest.setup.ts to set the integration test environment.
uniqueTestId
Generates a unique identifier for use in integration tests that hit a persistent database.
Why: tests accumulate rows over time. A pure Math.random() * 1_000_000
suffix collides via birthday paradox after enough runs, surfacing as
spurious "already taken" / unique-constraint failures. Combining the
current epoch with a random number partitions the namespace per
millisecond, so collisions require both a same-ms concurrent run AND
the same random draw.
Default format: ${prefix}${sep}${epochMs}${sep}${rand} — roughly
25 characters with a - separator. Use UniqueTestIdOptions.maxLength
when the consuming field can't fit that much.
prefixText to prepend (e.g. `'test'`, `'testorg'`, `'qtest'`).
optionsSee [UniqueTestIdOptions](#test/IntegrationTestIds#UniqueTestIdOptions).