Skip to content

Variable: mockMarshal

ts
const mockMarshal: {
  decode: Mock<(data: string) => unknown>;
  encode: Mock<(data: unknown) => string>;
};

Mock of the OpenXRay marshal global for jest/node.

Backed by JSON for plain arrays/objects, matching the engine marshal.encode/decode round-trip used by serialization helpers. Install as globalThis.marshal before running specs that serialize data.

Type Declaration

NameType
decodeMock<(data: string) => unknown>
encodeMock<(data: unknown) => string>