跳到主要内容

assertColdReplayInvariant()

function assertColdReplayInvariant(input): void;

Defined in: packages/rxdb-plugin-working-tree/src/working-tree/cold-replay.ts:365

核验冷重放不变量

Parameters​

ParameterTypeDescription
inputColdReplayInvariantInputHEAD 投影、全部单元、业务表实际内容

Returns​

void

Throws​

ColdReplayMismatchError 重放结果与业务表对不上

Throws​

WorkingTreeReplayCorruptionError 单元违反折叠不变量

Remarks​

捕获套件每组用例的末尾调用它。相等时静默返回——不打印「通过」,因为 6 个后端 × 十几组的日志里, 成功行只会淹没失败行。

Example​

assertColdReplayInvariant({ head, entries, actual: await readBusinessTables() });