Skip to main content
Version: Current

runLoggerDifferentialTck

@rotorsoft/act-root


@rotorsoft/act-root / act-tck/src / runLoggerDifferentialTck

Function: runLoggerDifferentialTck()

runLoggerDifferentialTck(options): void

Defined in: libs/act-tck/src/logger-differential-tck.ts:118

Cross-implementation differential contract for the Logger port (#1057).

A logger has no portable return value to byte-compare โ€” its output format is adapter-specific by design, which is exactly why runLoggerTck checks shape rather than bytes. The meaningful differential is therefore robustness and structural parity: driven through the identical call sequence (every level, both overloads, null and cyclic payloads, child spawning), do two implementations agree on what throws and what conforms? They must. A logger that throws on a cyclic payload the reference tolerates, or returns a non-conforming child, diverges from the reference vector.

Parametersโ€‹

optionsโ€‹

LoggerDifferentialTckOptions

Returnsโ€‹

void

Exampleโ€‹

import { runLoggerDifferentialTck } from "@rotorsoft/act-tck";
import { ConsoleLogger } from "@rotorsoft/act";
import { PinoLogger } from "../src/index.js";

runLoggerDifferentialTck({
name: "Console vs Pino",
loggers: [
{ name: "ConsoleLogger", factory: () => new ConsoleLogger({ level: "trace" }) },
{ name: "PinoLogger", factory: () => new PinoLogger({ level: "trace" }) },
],
});