@ottili/foundation-testing
v1.0.13
Published
Test factories and helpers for Foundation consumers (SoT §41).
Readme
@ottili/foundation-testing
Reusable testing utilities for the Ottili Foundation Framework.
Scope
This package provides factories, promise helpers and test-friendly abstractions that other Foundation packages can use in their test suites. It does not depend on React or the DOM.
Exports
createMockFoundationContext,createMockFoundationActor,createMockFoundationCompany,createMockFoundationAuthorization,createMockFoundationSession,createMockFoundationProductContext,createMockFoundationLocalization,createMockFoundationPreferences— factories.flushPromises,wait— async helpers.assertDefined<T>— runtime and type assertion.createMockTelemetryTransport— records telemetry batches.
Usage
import { createMockFoundationContext, flushPromises } from "@ottili/foundation-testing";
const context = createMockFoundationContext({
authorization: { permissions: new Set(["hq:read"]) },
});