@codesoul-co/hypha-testing / index
- Package index:
@codesoul-co/hypha-testing - Source:
packages/testing/src/index.ts - Exports: 4
Using this module
Aggregates the public entrypoint exports for @codesoul-co/hypha-testing; applications import these symbols from the package entrypoint instead of internal file paths.
Import from the package entrypoint
ts
import {
assertEventTypes,
assertStatePath,
collectEventTypes,
} from '@codesoul-co/hypha-testing';
import type {
GoldenTraceFixture,
} from '@codesoul-co/hypha-testing';Usage patterns
- Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 3 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
assertEventTypes | function | assertEventTypes(fixture: GoldenTraceFixture, expectedTypes: FrameworkEventType[]): boolean | Assert Event Types function with 1 public call signature; parameters and return types are listed below. |
assertStatePath | function | assertStatePath(fixture: GoldenTraceFixture, expectedPath: string[]): boolean | Assert State Path function with 1 public call signature; parameters and return types are listed below. |
collectEventTypes | function | collectEventTypes(events: FrameworkEvent[]): FrameworkEventType[] | Collect Event Types function with 1 public call signature; parameters and return types are listed below. |
GoldenTraceFixture | interface | interface GoldenTraceFixture | Golden Trace Fixture interface with 4 public fields or methods. |
assertEventTypes
Assert Event Types function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertEventTypes } from '@codesoul-co/hypha-testing'; - Source module:
index
Declaration
text
export declare function assertEventTypes(fixture: GoldenTraceFixture, expectedTypes: FrameworkEventType[]): boolean;Call signature
text
assertEventTypes(fixture: GoldenTraceFixture, expectedTypes: FrameworkEventType[]): booleanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fixture | GoldenTraceFixture | Yes | Required parameter; accepted values are defined by the type column. |
expectedTypes | FrameworkEventType[] | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
boolean - Description: The return contract is defined by the type shown above.
assertStatePath
Assert State Path function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertStatePath } from '@codesoul-co/hypha-testing'; - Source module:
index
Declaration
text
export declare function assertStatePath(fixture: GoldenTraceFixture, expectedPath: string[]): boolean;Call signature
text
assertStatePath(fixture: GoldenTraceFixture, expectedPath: string[]): booleanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fixture | GoldenTraceFixture | Yes | Required parameter; accepted values are defined by the type column. |
expectedPath | string[] | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
boolean - Description: The return contract is defined by the type shown above.
collectEventTypes
Collect Event Types function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { collectEventTypes } from '@codesoul-co/hypha-testing'; - Source module:
index
Declaration
text
export declare function collectEventTypes(events: FrameworkEvent[]): FrameworkEventType[];Call signature
text
collectEventTypes(events: FrameworkEvent[]): FrameworkEventType[]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
events | FrameworkEvent<unknown>[] | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
FrameworkEventType[] - Description: The return contract is defined by the type shown above.
GoldenTraceFixture
Golden Trace Fixture interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { GoldenTraceFixture } from '@codesoul-co/hypha-testing'; - Source module:
index
Declaration
text
export interface GoldenTraceFixture {
id: string;
version: string;
events: FrameworkEvent[];
statePath?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
events | property | events: FrameworkEvent<unknown>[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
statePath | property | statePath?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
