tcmts.store.test.history

Server

open () => Store

Shared

a string
b string
stored (hash: string, sourceText: string, doc?: string | undefined) => DefRecord
A definition of `hash` as `sourceText` reads, for the store's own tests (its IR is never looked at).

Tests

testABranchOnlyReadChangesNothing () => void
A branch only read (`--branch`) is what the store reads, text versions and all, and nothing changes any branch: names, text versions, history, todo, patches and branches stay as they were.
testCrissCrossMergeBases () => void
Criss-cross merges (two branches that merged each other) leave several best common ancestors: all of them, oldest first, the newest being the merge base.
testNamespaceAndCausalHashesArePinned () => void
Namespace and causal hashes are pinned.
testOneCausalPerBatch () => void
One causal per batch, however many transactions; merge parents and ancestry.
testTextVersionNamespacesArePinned () => void
A namespace node naming a text version is written with a fourth list, and hashed with it; one naming none is as before there were text versions (`testNamespaceAndCausalHashesArePinned`).
testTextVersionsAreBranchScoped () => void
Changing only how a definition reads (its comments, layout, doc) is a change of the branch that makes it: the other branches read it as before, it's an entry in the branch's history, and going back to an entry before it brings back the text as it was. Text a definition was first stored with is no version of its own.